1

The node and npm versions on my mac dont match. How do I downgrade npm to the same version as node?

Node:

$ node -v
$ v0.12.7

NPM:

$ npm -v
$ 2.14.4
1
  • 5
    they are separate projects and have their own separate versions Commented Dec 7, 2015 at 14:39

3 Answers 3

5

npm is a package manager for node.js. They don't have to be the same version. npm also gets updated more frequently than node, so they could not be expected to keep their versions the same

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

1 Comment

It would be good here to also talk to why node "pairs" a specific version of npm on the Previous Downloads page. For example, if I have node v7.7.2 and npm v4.1.2, then when using brew to downgrade/link to node v6.10, the npm version does not change. Is this problematic? If not, why bother "pairing" versions?
0

If it helps, you can install any version of NPM. On debian distros, to use npm version 4.5.0 you need to do:

$ curl https://registry.npmjs.org/npm/-/npm-4.5.0.tgz
$ tar -xvzf npm-4.5.0.tgz
$ cd package/
$ [sudo] make install

Comments

0

Their versions are different because they are independent softwares. Their development is not synchronized.

I recommend updating NPM when you can; I'm running npm version 5.2.0

You can easily upgrade your NPM version using npm install -g npm

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.