2

I'm trying to install node-gyp. I run

 sudo npm install -g node gyp

I get an error that says it requires node 0.8.0 and says that I'm running 0.6.12. The thing is, I'm not. I'm using NVM and I'm currently runnign 0.11.something. When I run node -v I get

 v0.11.1

Why does NPM think I'm running node 0.6? I've set the default NVM to the latest.

The exact error is:

Unsupported
Not compatible with your version of node/npm: request@2.21.0
Required ["node >= 0.8.0"]
Actual   {"npm":"1.1.4","node":"0.6.12"}

I'm running ubuntu.

Zeke Nierenberg
  • 2,216
  • 1
  • 19
  • 30

1 Answers1

3

It turns out that I had used

apt-get install nodejs

when I configured my system. That install had issues, and I ultimately used NVM. Even though node -v returned the correct version, I had to use apt-get to uninstall "node" (which left NVM's version just fine). Now I have new problems, but they are unrelated.

Zeke Nierenberg
  • 2,216
  • 1
  • 19
  • 30
  • NVM is a very good manager, just to be sure to include it in your .bashrc, you will be fine. I mostly suffer from major version changes but it is a good thing that nvm can handle everything easily. – Mustafa May 08 '13 at 03:18
  • 1
    I'm not using NVM, I'm using npm and "n", so this didn't solve my problem. If I remove node using apt-get, that also removes "npm". Not sure how to solve this. – Anoyz Jan 14 '14 at 13:44