Cannot find node-gyp

ぐ巨炮叔叔 提交于 2019-12-12 08:58:27

问题


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.

I noticed that npm -g installs everything into /usr/local/share/npm/bin/. Does this mean I need to add this to my PATH?


回答1:


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.




回答2:


I noticed that npm -g installs everything into /usr/local/share/npm/bin/. Does this mean I need to add this to my PATH?

Yes.



来源:https://stackoverflow.com/questions/15511500/cannot-find-node-gyp

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