Install error
sagexy opened this issue · comments
Mac OS X 10.10.5
Node.js v5.0.0
npm v3.3.6
xy-2:iMessageWebClient xy$ sudo npm install
Password:
ref@1.0.2 install /Users/xy/Github/iMessageWebClient/node_modules/ref
node-gyp rebuild
/usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp: line 3: node: command not found
npm WARN EPACKAGEJSON imessagewebclient@1.0.1 No repository field.
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! ref@1.0.2 install: node-gyp rebuild
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the ref@1.0.2 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the ref package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls ref
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/xy/Github/iMessageWebClient/npm-debug.log
Can you post the output of bash -c "echo \$PATH"
? It's possible that you didn't run export PATH
, so node-gyp doesn't have node available in your path.
Sorry, I didn't see that you're trying to use sudo npm install
. Make sure that you install both Node and NPM without sudo (since sudo npm install
doesn't export your path). This script may solve your problem, but you really want to have Node and NPM installed correctly.
Do you have /usr/bin/
and /usr/lib
in your path?