Skip to content
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

Usage Error when running yarn global add $PWD with yarn 2+ #1

Open
todrobbins opened this issue Mar 20, 2023 · 1 comment
Open

Usage Error when running yarn global add $PWD with yarn 2+ #1

todrobbins opened this issue Mar 20, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@todrobbins
Copy link

I get the following error when running the yarn global add $PWD command:

graph-validator git:(main) ✗ yarn global add $PWD
Usage Error: The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead

So I tried yarn dlx add $PWD just in case and got this output:

➜  graph-validator git:(main) ✗ yarn dlx add $PWD
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0013: │ add@npm:2.0.6 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: Done in 0s 388ms

Internal Error: Binary not found (add) for root-workspace-0b6124@workspace:.
    at z9 (/Users/trobbins/.cache/node/corepack/yarn/3.2.3/yarn.js:423:1838)
    at Object.VDe (/Users/trobbins/.cache/node/corepack/yarn/3.2.3/yarn.js:423:2354)
    at /Users/trobbins/.cache/node/corepack/yarn/3.2.3/yarn.js:601:306
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ar.mktempPromise (/Users/trobbins/.cache/node/corepack/yarn/3.2.3/yarn.js:314:68744)
    at async Rm.execute (/Users/trobbins/.cache/node/corepack/yarn/3.2.3/yarn.js:597:49122)
    at async Rm.validateAndExecute (/Users/trobbins/.cache/node/corepack/yarn/3.2.3/yarn.js:345:673)
    at async Bs.run (/Users/trobbins/.cache/node/corepack/yarn/3.2.3/yarn.js:359:2087)
    at async Bs.runExit (/Users/trobbins/.cache/node/corepack/yarn/3.2.3/yarn.js:359:2271)
    at async i (/Users/trobbins/.cache/node/corepack/yarn/3.2.3/yarn.js:446:12696)

Specs:

  • node v19.0.0
  • yarn v3.2.4
@logseq-cldwalker
Copy link
Collaborator

Hi. Sorry. I just saw this notification. I'm still using yarn 1.x but will let you know if I come across this when I upgrade. In the meantime, npm i -g also works to build the CLI

@logseq-cldwalker logseq-cldwalker changed the title Usage Error when running yarn global add $PWD Usage Error when running yarn global add $PWD with yarn 2+ Apr 11, 2023
@logseq-cldwalker logseq-cldwalker added the documentation Improvements or additions to documentation label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants