Problem installing socket.io

1,925 views
Skip to first unread message

dimi_did

unread,
Feb 28, 2012, 1:30:19 PM2/28/12
to Socket.IO
Hi guys.

This morning I've installed "node.js" and "npm" on my MacBook Pro
using Macintosh Installer
(node-v0.6.11.pkg).
Now I'm trying to install "socket.io" with "npm install socket.io"
command line, but I have a lot of errors and installation stops.
There are errors that I obtain:

Dimitris-MacBook-Pro:~ dimitri$ npm install socket.io
npm http GET https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/redis/0.6.7
npm http GET https://registry.npmjs.org/socket.io-client/0.9.0
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/redis/0.6.7
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.0
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/ws/0.4.0
npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http 304 https://registry.npmjs.org/ws/0.4.0

> w...@0.4.0 preinstall /Users/dimitri/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> make

sh: make: command not found
npm ERR! error installing w...@0.4.0
npm ERR! error installing socket.i...@0.9.0

npm ERR! Error: ENOENT, no such file or directory '/Users/dimitri/
node_modules/socket.io/node_modules/socket.io-client/node_modules/
___uglify-js.npm/package/test/unit/compress/test/issue29.js'
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <np...@googlegroups.com>
npm ERR!
npm ERR! System Darwin 11.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io"
npm ERR! cwd /Users/dimitri
npm ERR! node -v v0.6.11
npm ERR! npm -v 1.1.1
npm ERR! path /Users/dimitri/node_modules/socket.io/node_modules/
socket.io-client/node_modules/___uglify-js.npm/package/test/unit/
compress/test/issue29.js
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory '/Users/dimitri/
node_modules/socket.io/node_modules/socket.io-client/node_modules/
___uglify-js.npm/package/test/unit/compress/test/issue29.js'
npm ERR! errno {}
npm ERR! error installing sock...@0.9.0

npm ERR! w...@0.4.0 preinstall: `make`
npm ERR! `sh "-c" "make"` failed with 127
npm ERR!
npm ERR! Failed at the w...@0.4.0 preinstall script.
npm ERR! This is most likely a problem with the ws package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! make
npm ERR! You can get their info via:
npm ERR! npm owner ls ws
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Darwin 11.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io"
npm ERR! cwd /Users/dimitri
npm ERR! node -v v0.6.11
npm ERR! npm -v 1.1.1
npm ERR! code ELIFECYCLE
npm ERR! message w...@0.4.0 preinstall: `make`
npm ERR! message `sh "-c" "make"` failed with 127
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/dimitri/npm-debug.log
npm not ok

Could you please tell me what is wrong with this installation and how
I can do to resolve it.

ha1ogen

unread,
Feb 28, 2012, 11:55:42 PM2/28/12
to Socket.IO
ya im having the same problem
> npm ERR! error installing socket.io-cli...@0.9.0
>
> npm ERR! Error: ENOENT, no such file or directory '/Users/dimitri/
> node_modules/socket.io/node_modules/socket.io-client/node_modules/
> ___uglify-js.npm/package/test/unit/compress/test/issue29.js'
> npm ERR! You may report this log at:
> npm ERR!     <http://github.com/isaacs/npm/issues>
> npm ERR! or email it to:
> npm ERR!     <np...@googlegroups.com>
> npm ERR!
> npm ERR! System Darwin 11.3.0
> npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io"
> npm ERR! cwd /Users/dimitri
> npm ERR! node -v v0.6.11
> npm ERR! npm -v 1.1.1
> npm ERR! path /Users/dimitri/node_modules/socket.io/node_modules/
> socket.io-client/node_modules/___uglify-js.npm/package/test/unit/
> compress/test/issue29.js
> npm ERR! code ENOENT
> npm ERR! message ENOENT, no such file or directory '/Users/dimitri/
> node_modules/socket.io/node_modules/socket.io-client/node_modules/
> ___uglify-js.npm/package/test/unit/compress/test/issue29.js'
> npm ERR! errno {}
> npm ERR! error installing socket...@0.9.0

beezee

unread,
Feb 28, 2012, 5:10:56 PM2/28/12
to Socket.IO
I'm getting this same error, as of today. Looks like a change in a
dependency. Anyone have any insight to share?

On Feb 28, 1:30 pm, dimi_did <dimi...@empireavenue.com> wrote:
> Hi guys.
>
> This morning I've installed "node.js" and "npm" on my MacBook Pro
> using Macintosh Installer
> (node-v0.6.11.pkg).
> Now I'm trying to install "socket.io" with "npm install socket.io"
> command line, but I have a lot of errors and installation stops.
> There are errors that I obtain:
>
> Dimitris-MacBook-Pro:~ dimitri$ npm install socket.io
> > make
>
> sh: make: command not found
> npm ERR! error installing w...@0.4.0
> npm ERR! error installing socket.io-cli...@0.9.0
>
> npm ERR! Error: ENOENT, no such file or directory '/Users/dimitri/
> node_modules/socket.io/node_modules/socket.io-client/node_modules/
> ___uglify-js.npm/package/test/unit/compress/test/issue29.js'
> npm ERR! You may report this log at:
> npm ERR!     <http://github.com/isaacs/npm/issues>
> npm ERR! or email it to:
> npm ERR!     <np...@googlegroups.com>
> npm ERR!
> npm ERR! System Darwin 11.3.0
> npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io"
> npm ERR! cwd /Users/dimitri
> npm ERR! node -v v0.6.11
> npm ERR! npm -v 1.1.1
> npm ERR! path /Users/dimitri/node_modules/socket.io/node_modules/
> socket.io-client/node_modules/___uglify-js.npm/package/test/unit/
> compress/test/issue29.js
> npm ERR! code ENOENT
> npm ERR! message ENOENT, no such file or directory '/Users/dimitri/
> node_modules/socket.io/node_modules/socket.io-client/node_modules/
> ___uglify-js.npm/package/test/unit/compress/test/issue29.js'
> npm ERR! errno {}
> npm ERR! error installing socket...@0.9.0

beezee

unread,
Feb 29, 2012, 7:44:26 AM2/29/12
to Socket.IO
In case it helps anyone I was able to resolve this by explicitly
defining a version in my package.json file, so instead of

"socket.io": ""

I used

"socket.io": "0.7"

and all is well.

dimi_did

unread,
Feb 29, 2012, 10:18:09 AM2/29/12
to Socket.IO
Hi, beezee!

Could you please tell me where can I find this file?
What is the folder that contains it?

Brian Zeligson

unread,
Feb 29, 2012, 11:02:07 AM2/29/12
to sock...@googlegroups.com
Hi Dimi - In my case it was in my project root folder, where I had created it. package.json is just a way to list dependencies for your code so you can easily install them all by running "npm install" in that folder.

If you're not using one to manage your dependencies, you can specify a version when running npm install from the command line like this - npm install socket.io@0.7

For your reference, here's a great resource that I use often when I encounter something new with npm - http://blog.nodejitsu.com/npm-cheatsheet

Let me know if that helps you out.
--
Brian Zeligson
Facebook Twitter Flickr Blog RSS YouTube

dimi did

unread,
Feb 29, 2012, 12:35:05 PM2/29/12
to sock...@googlegroups.com
Thank you, Brian.
I've sent you several messages but it wasn't published....
I've already have npm, it was installed directly with node.js by Macintosh Installer (node-v0.6.11.pkg).
So into my npm folder there is a package.json, and I have a package.json by module, managed by npm.
But in my node folder (/usr/local/lib/node) I don't have any package.json...
Do you know what could I modify for it working ;-) ?

P.S. Thank you for blog - it seems very good!


From: dimi...@hotmail.com
To: sock...@googlegroups.com
Subject: RE: Problem installing socket.io
Date: Wed, 29 Feb 2012 11:26:50 -0500

Just done it:

cd /usr/local/lib/node_modules/npm/node_modules/
sudo npm install socket.io@0.7

Seems I don't have "make" installed on my Mac...


Date: Wed, 29 Feb 2012 11:02:07 -0500
Subject: Re: Problem installing socket.io
From: br...@streetwise-media.com
To: sock...@googlegroups.com

dimi_did

unread,
Feb 29, 2012, 12:18:45 PM2/29/12
to Socket.IO
Thank you, Brian.
I've already have npm, it was installed directly with node.js by
Macintosh Installer (node-v0.6.11.pkg).
So into my npm folder there is a package.json, and I have a
package.json by module, managed by npm.
But in my node folder (/usr/local/lib/node) I don't have any
package.json...
Do you know what could I modify for it working ;-) ?
P.S. Thank you for blog - it seems very good!

On Feb 29, 11:02 am, Brian Zeligson <br...@streetwise-media.com>
wrote:
> Hi Dimi - In my case it was in my project root folder, where I had created
> it. package.json is just a way to list dependencies for your code so you
> can easily install them all by running "npm install" in that folder.
>
> If you're not using one to manage your dependencies, you can specify a
> version when running npm install from the command line like this - npm
> install socket...@0.7
>
> For your reference, here's a great resource that I use often when I
> encounter something new with npm -http://blog.nodejitsu.com/npm-cheatsheet
> *Brian Zeligson*
>
> Web Developer
> Streetwise Media <http://streetwise-media.com/> &
> BostInno.com<http://bostinno.com/>
> 617.971.8813
> [image: Facebook] <http://www.facebook.com/BostInno> [image:
> Twitter]<http://twitter.com/#!/BostInno>
>  [image: Flickr] <http://www.flickr.com/photos/47186762@N03/sets/> [image:
> Blog RSS] <http://bostinno.com/feed/> [image:
> YouTube]<http://www.youtube.com/user/TheBostInnovation>

dimi did

unread,
Feb 29, 2012, 11:26:50 AM2/29/12
to sock...@googlegroups.com
Just done it:

cd /usr/local/lib/node_modules/npm/node_modules/
sudo npm install socket.io@0.7

Seems I don't have "make" installed on my Mac...


Date: Wed, 29 Feb 2012 11:02:07 -0500
Subject: Re: Problem installing socket.io
From: br...@streetwise-media.com
To: sock...@googlegroups.com

dimi did

unread,
Feb 29, 2012, 1:35:15 PM2/29/12
to sock...@googlegroups.com
After installing GCC Installer (https://github.com/kennethreitz/osx-gcc-installer) I got "make"!
And after that I was able to install "socket.io" too!
Hallelujah!!!
Thank you very much, guys!
Now I gonna play with it ;-) !


From: dimi...@hotmail.com
To: sock...@googlegroups.com
Subject: RE: Problem installing socket.io
Date: Wed, 29 Feb 2012 11:26:50 -0500

rj.c

unread,
Apr 19, 2012, 8:16:28 PM4/19/12
to sock...@googlegroups.com
This worked a treat. Had to install GCC installer as you did. Thanks

Chris Fidao

unread,
Sep 21, 2012, 8:30:00 AM9/21/12
to sock...@googlegroups.com
Hello -

Running the command with sudo should fix that. Where are you installing socket.io ? Since it moos like its trying to install in your use directory, using sudo shouldn't be necessary? Did you install with the global option (adding -g)?

$ sudo npm install socket.io



On Sep 21, 2012, at 7:30, "Sonali Bhadra" <sona...@gmail.com> wrote:

hi,

I have installed node.js and npm using Macintosh Installer but am getting the following error on npm install "socket,io"
Even putting the version didnt help..

npm ERR! Error: EACCES, open '/Users/sbhadra/.npm/c03de861-socket-io.lock'
npm ERR!  { [Error: EACCES, open '/Users/sbhadra/.npm/c03de861-socket-io.lock']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/Users/sbhadra/.npm/c03de861-socket-io.lock' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 11.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io"
npm ERR! cwd /Users/sbhadra
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.1.61
npm ERR! path /Users/sbhadra/.npm/c03de861-socket-io.lock
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open '/Users/sbhadra/.npm/c03de861-socket-io.lock'
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/sbhadra/npm-debug.log
npm ERR! not ok code 0


Sonali
Reply all
Reply to author
Forward
0 new messages