Open digeomel opened 2 years ago
I assume yarn installed corepack 0.10.0, because I definitely didn't install it manually myself.
It's most likely not Yarn that did that, nvm probably installed Corepack, Corepack 0.10.0 is bundled with Node.js v14.19.1.
I tried with npm and it fails with the following error:
What did you try exactly? It'd be helpful to see the command you used.
@aduh95 I think it's obvious, but here goes:
npm -g install corepack@0.13.0
It seems that nvm has a install-latest-npm
feature (https://github.com/nvm-sh/nvm#migrating-global-packages-while-installing), maybe that also upgrades Corepack (although I doubt it, Corepack is nowhere to be seen in their docmentation).
If that doesn't work, I think you would need to open an issue to nvm and/or install Node.js from a different source that lets you chose whether you want the vendored version of Corepack alongside it. FWIW waiting for the next non-security release of Node.js v14.x is also an option, as it will include an updated version of Corepack, but I don't know when that's going to happen.
As the npm error tells you, it refuses to overwrite something it didn't create, you can add the -f
flag to force it.
npm -g -f install corepack@0.13.0
I am using yarn 1.22.19 with node 14.19.1 (actually using nvm to be able to use multiple node versions, but I'm not sure this is important here). I assume yarn installed corepack 0.10.0, because I definitely didn't install it manually myself. How can I upgrade to the latest version 0.13.0? Do I need to uninstall yarn first? I tried with npm and it fails with the following error: