You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 packageManager field
Works: Add in README to make sure users enable corepack with corepack enable
The text was updated successfully, but these errors were encountered:
Ok this was superconfusing but only solution seems to be to add the corepack enable to the README (in case user has it disabled) because there actuall IS a 4.5.1 of yarn but it's only shipped via corepack NOT through npmjs 🤕
This is why I prefer pnpm lol
Describe the bug
yarn
installation breaks in Node v14+ as thepackageManager
field is incorrect (there is no yarn v4.5.1) and starting Node v14+ node enforces thepackageManager
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
nvm use 14
(if node installed with nvm)corepack disable
(if currently enabled)yarn
Expected behavior
Proper installation.
Desktop (please complete the following information):
Solution
packageManager
fieldcorepack enable
The text was updated successfully, but these errors were encountered: