-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Describe the bug
yarn installation breaks in Node v14+ as the packageManager field is incorrect (there is no yarn v4.5.1) and starting Node v14+ node enforces the packageManager field due to the introduction of corepack. There were discussions of removing corepack from the node distribution but regardless, this incorrect field breaks on many node versions when corepack is disabled because of the yarn version mismatch (interestingly, it works when corepack is enabled).
To Reproduce
- Use node 14+
nvm use 14(if node installed with nvm) corepack disable(if currently enabled)yarn- Breaks with the following message
error This project's package.json defines "packageManager": "[email protected]". However the current global version of Yarn is 1.22.22.
Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack.Expected behavior
Proper installation.
Desktop (please complete the following information):
- Linux
- Node 14+ with corepack enabled
Solution
- EDIT: Does NOT WORK. Unclear to me which yarn version the project uses but fix the
packageManagerfield - Works: Add in README to make sure users enable corepack with
corepack enable
Metadata
Metadata
Assignees
Labels
No labels