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

Corepack is skipped with Node 16.9.0. Unable to access it. #660

Closed
lockHrt opened this issue Sep 9, 2021 · 5 comments
Closed

Corepack is skipped with Node 16.9.0. Unable to access it. #660

lockHrt opened this issue Sep 9, 2021 · 5 comments

Comments

@lockHrt
Copy link

lockHrt commented Sep 9, 2021

Issue:

nodejs/corepack#52

Node 16.9.0 includes a module called corepack. Corepack allows you to use yarn, pnpm without having to install them (just like how you can use npm right now). Terminal is unable to find the corepack. It seems that corepack isn't installed with the node 16.9.0 if we install node via nvm-windows

How To Reproduce:

  1. nvm install 16.9.0
  2. nvm use 16.9.0
  3. corepack enable
    this one gives error saying it can't recognize/find corepack

Node docs on Corepack

@coreybutler
Copy link
Owner

coreybutler commented Sep 10, 2021

This was just released as an experimental feature and Node doesn't ship with it for Windows yet. The only bundled distributions released are available at https://github.com/nodejs/corepack/actions/runs/276463953. Until there is a stable download source for Node with corepack on Windows, there isn't much NVM4W can do.

Windows users can apparently install corepack manually though. See https://github.com/nodejs/corepack#manual-installs. With a fresh install of Node 16.9.0, just run npm i -g corepack.

I'll leave this open as an enhancement request, but until corepack is bundled with the Node windows binaries, there isn't anything that can be done.

@merceyz
Copy link

merceyz commented Sep 10, 2021

Node doesn't ship with it for Windows yet. The only bundled distributions released are available at https://github.com/nodejs/corepack/actions/runs/276463953. Until there is a stable download source for Node with corepack on Windows [...]

Corepack is installed by default in the Windows installer and is present in the zip distributions starting from 16.9.0 so not sure what you mean by that.
https://nodejs.org/dist/v16.9.0/node-v16.9.0-win-x86.zip
https://nodejs.org/dist/v16.9.0/node-v16.9.0-win-x64.zip

@coreybutler
Copy link
Owner

Thanks @merceyz - I was unaware it was shipping as part of the distribution. We can work with that.

@coreybutler
Copy link
Owner

Resolved in https://github.com/coreybutler/nvm-windows/releases/tag/1.1.8

@perqin
Copy link

perqin commented Feb 9, 2022

According to Corepack's documentation:

Corepack is distributed by default with Node.js 14.19.0 and 16.9.0, but is opt-in for the time being. Run corepack enable to install the required shims.

And corepack binary file is included in 14.19.0 distributed zip, so this issue also occurs when installing node 14.19.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants