Justin Meltzer
Justin Meltzer

Reputation: 13548

Cannot find 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.

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

Upvotes: 4

Views: 16838

Answers (2)

lutzh
lutzh

Reputation: 4965

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.

Upvotes: 4

Justin Ethier
Justin Ethier

Reputation: 134167

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.

Upvotes: 3

Related Questions