Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global binaries #3651

Closed
merceyz opened this issue Oct 27, 2021 · 0 comments
Closed

Global binaries #3651

merceyz opened this issue Oct 27, 2021 · 0 comments

Comments

@merceyz
Copy link
Member

merceyz commented Oct 27, 2021

I also met the same problem.

❯ node -v
v17.0.1
❯ npm -v
8.1.0
❯ yarn -v
3.1.0
❯ yarn add typescript
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 437ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ typescript@npm:4.4.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ typescript@patch:typescript@npm%3A4.4.4#~builtin<compat/typescript>::version=4.4.4&hash=ddd1e8 can't be 
➤ YN0000: └ Completed in 0s 725ms
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: Done in 1s 254ms
❯ tsc -v
tsc: The term 'tsc' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
❯ yarn run tsc -v
Version 4.4.4

If I execute tsc -v directly in Powershell Core, it will throw out an error. But if I invoke yarn run tsc -v, it does response the version of TypeScript as I expected. Note: I didn't configure tsc for scripts in package.json (details stored here).

I'm using Plug'n'Play and Zero-Install features from Yarn v3.1.0, is there something wrong with my configurations? Should I install TypeScript to global environment with yarn dlx add typescript or yarn global add typescript ?

Originally posted by @Dragon1573 in yarnpkg/yarn#648 (comment)

@yarnpkg yarnpkg locked and limited conversation to collaborators Oct 27, 2021
@merceyz merceyz closed this as completed Oct 27, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant