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

How to reinstall npm when I uninstall npm by npm? #303

Closed
ErrorPower2001 opened this issue Jan 28, 2025 · 2 comments
Closed

How to reinstall npm when I uninstall npm by npm? #303

ErrorPower2001 opened this issue Jan 28, 2025 · 2 comments

Comments

@ErrorPower2001
Copy link

I'm a new at NodeJS and NVS and out of curiosity, I uninstalled npm using npm.

nvs add 23.6.0
npm uninstall --global npm

Now I just can reinstall to get npm back. Is there any way to reinstall npm in current NodeJS version?

nvs rm 23.6.0
nvs add 23.6.0
@jasongin
Copy link
Owner

I'm not sure if I understand, but maybe you are just missing a step at the end:

nvs use 23.6.0

That will add that version of Node.js including npm to your PATH.

Also to set it as the default:

nvs link

@ljharb
Copy link
Contributor

ljharb commented Jan 28, 2025

Once you uninstall npm, you can't get it back, and you have to reinstall that version of node.

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

No branches or pull requests

3 participants