npm thinks node is out of date, but it isn't

扶醉桌前 提交于 2019-12-11 01:34:02

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/16431649/npm-thinks-node-is-out-of-date-but-it-isnt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!