找不到node-gyp [英] Cannot find node-gyp
问题描述
我用自制软件安装了节点v0.8.22.我在/usr/local/bin/
中有我的节点二进制文件,但是我需要用node-gyp
重新编译一个节点附加组件,但是在我的PATH
中似乎找不到它.我尝试运行npm install -g node-gyp
,但它仍然不在我的路上.
I installed node v0.8.22 with homebrew. I have my node binary in /usr/local/bin/
but I need to recompile a node add-on with node-gyp
but it cannot seem to find it in my PATH
. I tried running npm install -g node-gyp
but it's still not in my path.
我注意到npm -g将所有内容安装到/usr/local/share/npm/bin/
中.这是否意味着我需要将其添加到我的PATH
?
I noticed that npm -g installs everything into /usr/local/share/npm/bin/
. Does this mean I need to add this to my PATH
?
推荐答案
按照j_mcnally的建议,您应该尝试在路径中添加/usr/local/share/npm/bin/
.这里应该有一个node-gyp
的符号链接,应该应该可以解决您的问题.
As j_mcnally recommends, you should try adding /usr/local/share/npm/bin/
to your path. There should be a symlink to node-gyp
here, which should resolve your problem.
这篇关于找不到node-gyp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!