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

[Bug]: Internal Error: The package @yarnpkg/monorepo@workspace:. isn't supported by any of the available linkers #2187

Closed
1 task
joeldenning opened this issue Nov 29, 2020 · 6 comments
Labels
bug Something isn't working upholded Real issues without formal reproduction

Comments

@joeldenning
Copy link

  • I'd be willing to implement a fix

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

When I run yarn set version from sources, I get the following error:

➤ YN0000: Fetching the latest commits

  $ git fetch origin master --force
  $ git reset --hard FETCH_HEAD
  $ git clean -dfx

➤ YN0000: Building a fresh bundle

Internal Error: The package @yarnpkg/monorepo@workspace:. isn't supported by any of the available linkers
    at fn (/private/var/folders/74/8gbl9tds5h7fmjz4cxjvywyr0000gn/T/yarnpkg-sources/d0a670/packages/yarnpkg-core/sources/scriptUtils.ts:281:13)
    at Function.openPromise (/private/var/folders/74/8gbl9tds5h7fmjz4cxjvywyr0000gn/T/yarnpkg-sources/d0a670/packages/yarnpkg-fslib/sources/ZipOpenFS.ts:36:20)
    at Object.hasPackageScript (/private/var/folders/74/8gbl9tds5h7fmjz4cxjvywyr0000gn/T/yarnpkg-sources/d0a670/packages/yarnpkg-core/sources/scriptUtils.ts:273:26)
    at RunCommand.execute (/private/var/folders/74/8gbl9tds5h7fmjz4cxjvywyr0000gn/T/yarnpkg-sources/d0a670/packages/plugin-essentials/sources/commands/run.ts:77:31)
    at RunCommand.validateAndExecute (/private/var/folders/74/8gbl9tds5h7fmjz4cxjvywyr0000gn/T/yarnpkg-sources/d0a670/.yarn/cache/clipanion-npm-2.6.2-65049fe240-d162deedd0.zip/node_modules/clipanion/lib/index.js:1118:26)
    at Cli.run (/private/var/folders/74/8gbl9tds5h7fmjz4cxjvywyr0000gn/T/yarnpkg-sources/d0a670/.yarn/cache/clipanion-npm-2.6.2-65049fe240-d162deedd0.zip/node_modules/clipanion/lib/index.js:1371:24)
    at EntryCommand.execute (/private/var/folders/74/8gbl9tds5h7fmjz4cxjvywyr0000gn/T/yarnpkg-sources/d0a670/packages/plugin-essentials/sources/commands/entries/run.ts:18:14)
    at EntryCommand.validateAndExecute (/private/var/folders/74/8gbl9tds5h7fmjz4cxjvywyr0000gn/T/yarnpkg-sources/d0a670/.yarn/cache/clipanion-npm-2.6.2-65049fe240-d162deedd0.zip/node_modules/clipanion/lib/index.js:1118:26)
    at Cli.run (/private/var/folders/74/8gbl9tds5h7fmjz4cxjvywyr0000gn/T/yarnpkg-sources/d0a670/.yarn/cache/clipanion-npm-2.6.2-65049fe240-d162deedd0.zip/node_modules/clipanion/lib/index.js:1371:24)
    at Cli.runExit (/private/var/folders/74/8gbl9tds5h7fmjz4cxjvywyr0000gn/T/yarnpkg-sources/d0a670/.yarn/cache/clipanion-npm-2.6.2-65049fe240-d162deedd0.zip/node_modules/clipanion/lib/index.js:1388:28)
➤ YN0001: Error: Child "yarn" exited with exit code 1
    at ChildProcess.<anonymous> (/Users/joeldenning/code/musashi-root-config/.yarn/releases/yarn-berry.cjs:2:378609)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1048:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
➤ YN0000: Failed with errors in 5s 128ms

Screenshots

image

Environment if relevant (please complete the following information):

  • OS: [e.g. OSX, Linux, Windows, ...] OSX Big Sur
  • Node version [e.g. 8.15.0, 10.15.1, ...] 14.15.0
  • Yarn version [e.g. 2.0.0-rc1, ...] 2.3.3

Additional context

@joeldenning joeldenning added the bug Something isn't working label Nov 29, 2020
@larixer
Copy link
Member

larixer commented Nov 30, 2020

@joeldenning How can we reproduce the problem, can you upload the repo somewhere on which we can reproduce the problem, or can you provide precise repro steps?

@joeldenning
Copy link
Author

can you upload the repo somewhere

This error is not related to running yarn in a code repository - it occurs whenever I run yarn set version from sources inside of any directory.

can you provide precise repro steps?

For me:

npm i -g yarn
yarn set version berry
yarn set version from sources

I imagine that on other computers those commands don't throw an error - I don't know what about my environment would cause it to fail.

@merceyz
Copy link
Member

merceyz commented Dec 9, 2020

Do you have a .yarnrc.yml file in your home directory that sets an invalid nodeLinker value?

@merceyz merceyz added the waiting for feedback Will autoclose in a while unless more data are provided label Dec 9, 2020
@joeldenning
Copy link
Author

I do have a .yarnrc in my home directory with the following contents:

yarnPath: ".yarn/releases/yarn-berry.cjs"

I tried yarn set version from sources again and no longer receive the nodeLinker error, but receive a new error now:

~ [1] $ yarn set version from sources
➤ YN0000: Fetching the latest commits

  $ git fetch origin master --force
  $ git reset --hard FETCH_HEAD
  $ git clean -dfx

➤ YN0000: Building a fresh bundle

Usage Error: Unrecognized or legacy configuration settings found: changesetIgnorePatterns - run "yarn config -v" to see the list of settings supported in Yarn (in /private/var/folders/74/8gbl9tds5h7fmjz4cxjvywyr0000gn/T/yarnpkg-sources/d0a670/.yarnrc.yml)

$ yarn run [--inspect] [--inspect-brk] <scriptName> ...
➤ YN0001: Error: Child "yarn" exited with exit code 1
    at ChildProcess.<anonymous> (/Users/joeldenning/.yarn/releases/yarn-berry.cjs:2:403919)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1048:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
➤ YN0000: Failed with errors in 1s 256ms
~ [1] $ cat .yarnrc.yml
yarnPath: ".yarn/releases/yarn-berry.cjs"
~ $ cat ../.yarnrc.yml
cat: ../.yarnrc.yml: No such file or directory
~ [1] $ cat ../../.yarnrc.yml
cat: ../../.yarnrc.yml: No such file or directory
~ [1] $ pwd
/Users/joeldenning

@merceyz
Copy link
Member

merceyz commented Dec 9, 2020

As https://yarnpkg.com/getting-started/install mentions you should be running that command in your project, not the home directory (i.e. remove yarnPath from your global config). Will keep this open as there does seem to be a bug when installed globally

@merceyz merceyz added upholded Real issues without formal reproduction and removed waiting for feedback Will autoclose in a while unless more data are provided labels Dec 9, 2020
@merceyz merceyz mentioned this issue Oct 19, 2022
@merceyz
Copy link
Member

merceyz commented Oct 19, 2022

Will keep this open as there does seem to be a bug when installed globally

In retrospect it's most likely the same issue as #2121

@merceyz merceyz marked this as a duplicate of #2121 Oct 19, 2022
@merceyz merceyz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upholded Real issues without formal reproduction
Projects
None yet
Development

No branches or pull requests

3 participants