npm 认为 node 已过时,但事实并非如此 [英] npm thinks node is out of date, but it isn't
问题描述
我正在尝试安装 node-gyp.我跑
I'm trying to install node-gyp. I run
sudo npm install -g node gyp
我收到一个错误,说它需要节点 0.8.0,并说我正在运行 0.6.12.问题是,我不是.我正在使用 NVM,目前正在运行 0.11.something.当我运行 node -v 我得到 p>
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
为什么 NPM 认为我在运行节点 0.6?我已将默认 NVM 设置为最新.
Why does NPM think I'm running node 0.6? I've set the default NVM to the latest.
确切的错误是:
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"}
我正在运行 ubuntu.
I'm running ubuntu.
推荐答案
原来我用过
apt-get install nodejs
当我配置我的系统时.那个安装有问题,我最终使用了 NVM.即使 node -v 返回了正确的版本,我也不得不使用 apt-get 卸载node"(这使得 NVM 的版本很好).现在我遇到了新问题,但它们并不相关.
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.
这篇关于npm 认为 node 已过时,但事实并非如此的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!