Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails when using "npm -g" #51

Closed
martinsik opened this issue Jul 5, 2012 · 2 comments
Closed

Installation fails when using "npm -g" #51

martinsik opened this issue Jul 5, 2012 · 2 comments

Comments

@martinsik
Copy link

Hi, I'm having this weird problem when I try to install websocket globally using npm -g.

OS: OS X 10.7.4 (11.4.0 Darwin Kernel Version 11.4.0)
node.js: v0.8.1
npm: 1.1.33

I fails only when I use the -g parameter.

martin@~/develop/nodejs$ sudo npm -g install websocket 
npm http GET https://registry.npmjs.org/websocket
npm http 304 https://registry.npmjs.org/websocket
npm http GET https://registry.npmjs.org/websocket/-/websocket-1.0.6.tgz
npm http 200 https://registry.npmjs.org/websocket/-/websocket-1.0.6.tgz

> websocket@1.0.6 install /usr/local/lib/node_modules/websocket
> node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! rebuild error Error: EACCES, mkdir '/Users/martin/.node-gyp'
gyp ERR! not ok 
npm ERR! websocket@1.0.6 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the websocket@1.0.6 install script.
npm ERR! This is most likely a problem with the websocket 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 websocket
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/usr/local/bin/npm" "-g" "install" "websocket"
npm ERR! cwd /Users/martin/develop/nodejs
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! code ELIFECYCLE
npm ERR! message websocket@1.0.6 install: `node-gyp rebuild`
npm ERR! message `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/martin/develop/nodejs/npm-debug.log
npm ERR! not ok code 0

It says This is most likely a problem with the websocket package but I'm really not able to figure out why.

@theturtle32
Copy link
Owner

EACCES is a permission denied error. Strange that it's getting that kind of error when trying to create a directory in your own home directory.

In any case, WebSocket-Node is not meant to be installed globally. Why are you trying to use the -g option?

Brian

Sent from my iPhone

On Jul 5, 2012, at 1:49 AM, Martin Sikorareply@reply.github.com wrote:

Hi, I'm having this weird problem when I try to install websocket globally using npm -g.

OS: OS X 10.7.4 (11.4.0 Darwin Kernel Version 11.4.0)
node.js: v0.8.1
npm: 1.1.33

I fails only when I use the -g parameter.

martin@~/develop/nodejs$ sudo npm -g install websocket
npm http GET https://registry.npmjs.org/websocket
npm http 304 https://registry.npmjs.org/websocket
npm http GET https://registry.npmjs.org/websocket/-/websocket-1.0.6.tgz
npm http 200 https://registry.npmjs.org/websocket/-/websocket-1.0.6.tgz

websocket@1.0.6 install /usr/local/lib/node_modules/websocket
node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! rebuild error Error: EACCES, mkdir '/Users/martin/.node-gyp'
gyp ERR! not ok
npm ERR! websocket@1.0.6 install: node-gyp rebuild
npm ERR! sh "-c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the websocket@1.0.6 install script.
npm ERR! This is most likely a problem with the websocket 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 websocket
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/usr/local/bin/npm" "-g" "install" "websocket"
npm ERR! cwd /Users/martin/develop/nodejs
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! code ELIFECYCLE
npm ERR! message websocket@1.0.6 install: node-gyp rebuild
npm ERR! message sh "-c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/martin/develop/nodejs/npm-debug.log
npm ERR! not ok code 0

It says This is most likely a problem with the websocket package but I'm really not able to figure out why.


Reply to this email directly or view it on GitHub:
#51

@martinsik
Copy link
Author

Ok, no problem. I wanted to share the same instance of websocket package over a few projects and I thought installing it globally would be the best option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants