node-gyp错误找不到模块'/node_modules/node-gyp/bin/node-gyp.js'

时间:2015-04-14 18:10:11

标签: node.js node-gyp

为什么在/ usr / bin / node-gyp中安装node-gyp本身时,它是否在绝对路径中寻找node-gyp.js? 如果我做

find /usr -name node-gyp.js 

结果是

/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
/usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js
/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js

可以看出,我在两个地方都有node-gyp.js。如何指示node-gyp搜索这些地方?

1 个答案:

答案 0 :(得分:1)

这是一个节点gyp安装问题。 我使用的是旧版本的npm;升级npm后,node-gyp安装成功并运行正常。

相关问题