iMessageWebClient icon indicating copy to clipboard operation
iMessageWebClient copied to clipboard

Install error

Open sagexy opened this issue 8 years ago • 5 comments

Mac OS X 10.10.5 Node.js v5.0.0 npm v3.3.6

image

image

xy-2:iMessageWebClient xy$ sudo npm install Password:

[email protected] 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 [email protected] 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! [email protected] install: node-gyp rebuild npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the [email protected] 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

sagexy avatar Nov 10 '15 09:11 sagexy

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.

christianbundy avatar Nov 16 '15 19:11 christianbundy

df3dc81d-2e27-4d92-8cc3-90ea5c29e5f4

sagexy avatar Nov 17 '15 02:11 sagexy

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.

christianbundy avatar Nov 17 '15 02:11 christianbundy

I tried

sudo ln -s /usr/local/bin/node /usr/bin/node sudo ln -s /usr/local/lib/node /usr/lib/node sudo ln -s /usr/local/bin/npm /usr/bin/npm sudo ln -s /usr/local/bin/node-waf /usr/bin/node-waf

and

node-and-npm-in-30-seconds.sh

but it still doesn't work

image

sagexy avatar Nov 18 '15 03:11 sagexy

Do you have /usr/bin/ and /usr/lib in your path?

christianbundy avatar Nov 18 '15 21:11 christianbundy