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
I think just running npm install --global corepack@latest is fine which will replace the symlink to the corepack binary shipped with the node installation? Maybe not on Windows 🤷🏻♂️
The first workaround offered by @rotu works well on windows if corepack is already installed through your nodejs install, though you may have to move the path of nodejs from system to user variables.
This did not work for me. I had to uninstall NodeJS and then reinstall it, making sure to disable the corepack integration in the installer. After it was reinstalled without corepack, I could manage corepack via npm. Hopefully this helps someone out.
As @trevor-hackett described, you need to disable the "corepack manager" feature if you installed Node.js using a Windows msi package and you want to update the version of Corepack.
You can access this through Windows Settings > Apps > Installed Apps
Select Node.js and then Modify
Then if you execute
npm install -g corepack@latest
it will install Corepack globally and Windows will not have two different versions of Corepack installed - one from msi and another from npm.
Reacted by Hyunbin Seo, Elvis Furtado, Denzell Griffith and stufffancy
I would like to suggest adding an "Updating Corepack" section to the README to describe how to update Corepack after installing Node.js according to any of the methods described on the Download Node.js page.
Please check the updated Corepack Manual Installs section which includes additional advice for dealing with Windows Installer .msi installations when manually updating with npm:
@MikeMcC399 I don't get it. Please point me where I wrong.
Previously I have installed corepack with Nodejs. After the latest discussions I've deinstalled Nodejs and installed the latest 23.7.0 with uncheked the "corepack" checkbox. Then I've ran npm i -g corepack
Executed corepack enable and corepack use yarn@1.22.22 at my project's folder.
At this point I'm expecting that everything will work as previously with as Nodejs has installed within Corepack. But it doesn't.
I'm getting an error:
The path node_modules/corepack/dist/yarn.js I found in C:\Program Files\nodejs\yarn.ps1 that starts by C:\Program Files\nodejs\yarn.CMD
Am I reinstalled corepack wrong or something else?
Activity
simonhaenisch commentedon Oct 24, 2023
I think just running
npm install --global corepack@latestis fine which will replace the symlink to the corepack binary shipped with the node installation? Maybe not on Windows 🤷🏻♂️inoyakaigor commentedon Oct 31, 2023
No, on Windows it is not working
gskyu commentedon Mar 21, 2024
The first workaround offered by @rotu works well on windows if corepack is already installed through your nodejs install, though you may have to move the path of nodejs from system to user variables.
codersjj commentedon Jan 18, 2025
The preferred option is to use the Corepack version that is distributed along with Node.js itself. So if you want to update Corepack, you can update your Node.js version. 😃
hyunbinseo commentedon Feb 6, 2025
It does work on Windows 11. This is what I've used to workaround these issues:
corepack use pnpm@latest-xpnpm/pnpm#9029 (comment)trevor-hackett commentedon Feb 6, 2025
This did not work for me. I had to uninstall NodeJS and then reinstall it, making sure to disable the corepack integration in the installer. After it was reinstalled without corepack, I could manage corepack via npm. Hopefully this helps someone out.
MikeMcC399 commentedon Feb 7, 2025
inoyakaigor commentedon Feb 7, 2025
Just checked updating:
Still don't work. Also checked in new instance of CMD
W11 24h2
Nodejs 23.6, installed with default options from msi package
MikeMcC399 commentedon Feb 7, 2025
@inoyakaigor
As @trevor-hackett described, you need to disable the "corepack manager" feature if you installed Node.js using a Windows msi package and you want to update the version of Corepack.
You can access this through Windows Settings > Apps > Installed Apps
Select Node.js and then Modify
Then if you execute
it will install Corepack globally and Windows will not have two different versions of Corepack installed - one from msi and another from npm.
MikeMcC399 commentedon Feb 7, 2025
I would like to suggest adding an "Updating Corepack" section to the README to describe how to update Corepack after installing Node.js according to any of the methods described on the Download Node.js page.
MikeMcC399 commentedon Feb 7, 2025
MikeMcC399 commentedon Feb 7, 2025
Please check the updated Corepack Manual Installs section which includes additional advice for dealing with Windows Installer .msi installations when manually updating with npm:
inoyakaigor commentedon Feb 10, 2025
@MikeMcC399 I don't get it. Please point me where I wrong.
Previously I have installed corepack with Nodejs. After the latest discussions I've deinstalled Nodejs and installed the latest 23.7.0 with uncheked the "corepack" checkbox. Then I've ran
npm i -g corepackExecuted
corepack enableandcorepack use yarn@1.22.22at my project's folder.At this point I'm expecting that everything will work as previously with as Nodejs has installed within Corepack. But it doesn't.
I'm getting an error:

The path
node_modules/corepack/dist/yarn.jsI found inC:\Program Files\nodejs\yarn.ps1that starts byC:\Program Files\nodejs\yarn.CMDAm I reinstalled corepack wrong or something else?
MikeMcC399 commentedon Feb 10, 2025
@inoyakaigor
Could you please open a separate issue for this? You have discovered a different issue working with Node.js msi.
This issue is closed, so it is not a good place to be looking at a new problem.
If you open a new issue I can give you some tips about what you should do next.
MikeMcC399 commentedon Feb 10, 2025
@inoyakaigor
The short version of the advice to you is as follows, since Node.js
23.7.0already has the fix:npm uninstall -g corepackIf you want more detail, then please open a new issue.
MikeMcC399 commentedon Feb 11, 2025