18

I want to install node 6.9.4.

In windows console I try with this:

npm install [email protected] 

And it throws this error:

npm ERR! No compatible version found: [email protected] npm ERR! Valid install targets: npm ERR! 0.0.0 

In linux the result is similar. I try with

sudo npm install [email protected] 

and the output is:

npm ERR! version not found: [email protected] 

Is there a way to install certain node version with npm?

4
  • Can you update your npm with npm install -g npm and then try to install node again? Commented Jul 7, 2017 at 11:26
  • 1
    You cannot install node via npm. NPM is the package manager for node. Inorder to install a particular version of node. You can use nvm Commented Jul 7, 2017 at 11:47
  • Also you should avoid installing packaged with sudo Commented Jul 7, 2017 at 11:47
  • Many thanks, Sahan, but the result is the same, as if there where no node versions, just 0.0.0 Commented Jul 7, 2017 at 11:53

3 Answers 3

34

You should use nvm to install and manage node versions and not npm

NPM is the package manager for node and not a version manager.

To install a particular version of node using nvm, just do

nvm install v0.10.32

NPM should be used to install packages/modules. So say you need to use request module for a particular project You can do

npm install request

Both these support tons of options which could be found over the documentations

Sign up to request clarification or add additional context in comments.

Comments

12

I recommend you use nvm: Nodev Version Manager

It would be as easy as

nvm install 6.9.4 

It's a really good tool to manager all of your node versions.

1 Comment

This is not the package you are looking for: please go to nvm.sh It throws this error
0

Since I found this when searching how to update nodejs, I thought I'd drop this here:

npm install nodejs@14 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.