logseq / graph-validator

Validate your logseq graphs
MIT License
48 stars 0 forks source link

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

Open todrobbins opened 1 year ago

todrobbins commented 1 year ago

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:

logseq-cldwalker commented 1 year ago

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