socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

Can't really install

Open almeidamarcell opened this issue 13 years ago • 6 comments

Hello all!

I've seen a lot of people with the same problem as me. But none of those links I found it could really give me a solution.

I'm trying to install socket.io but I all the time get the following error:

MacBook-Air-de-Marcell:~ almeidamarcell$ sudo npm install socket.io Password: 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.7.3 npm http GET https://registry.npmjs.org/socket.io-client/0.9.11 npm http GET https://registry.npmjs.org/policyfile/0.0.4 npm http GET https://registry.npmjs.org/base64id/0.1.0 npm http 304 https://registry.npmjs.org/redis/0.7.3 npm http 304 https://registry.npmjs.org/policyfile/0.0.4 npm http 304 https://registry.npmjs.org/base64id/0.1.0 npm http 304 https://registry.npmjs.org/socket.io-client/0.9.11 npm http GET https://registry.npmjs.org/uglify-js/1.2.5 npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2 npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http GET https://registry.npmjs.org/ws npm http 304 https://registry.npmjs.org/ws npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2 npm http 304 https://registry.npmjs.org/uglify-js/1.2.5 npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http GET https://registry.npmjs.org/zeparser/0.0.5 npm http 304 https://registry.npmjs.org/zeparser/0.0.5 npm http GET https://registry.npmjs.org/commander npm http GET https://registry.npmjs.org/tinycolor npm http GET https://registry.npmjs.org/options npm http 304 https://registry.npmjs.org/tinycolor npm http 304 https://registry.npmjs.org/options npm http 304 https://registry.npmjs.org/commander

[email protected] install /Users/almeidamarcell/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws (node-gyp rebuild 2> builderror.log) || (exit 0)

CXX(target) Release/obj.target/bufferutil/src/bufferutil.o SOLINK_MODULE(target) Release/bufferutil.node SOLINK_MODULE(target) Release/bufferutil.node: Finished CXX(target) Release/obj.target/validation/src/validation.o SOLINK_MODULE(target) Release/validation.node SOLINK_MODULE(target) Release/validation.node: Finished [email protected] node_modules/socket.io ├── [email protected] ├── [email protected] ├── [email protected]

└── [email protected] ([email protected], [email protected], [email protected], [email protected])

So, anyone knows what is going on? I already checked and NPM and node are installed correctly.

MacBook-Air-de-Marcell:~ almeidamarcell$ node -v v0.10.6

MacBook-Air-de-Marcell:~ almeidamarcell$ npm -v 1.2.18

I'm really looking forward to solve this problem! Thanks in advance.

almeidamarcell avatar May 16 '13 01:05 almeidamarcell

What's the error?

rauchg avatar May 16 '13 02:05 rauchg

@guille Sorry if I'm saying newbie stuff, but what a paste is not an error? Because I try to follow this tutorial(http://chrislarson.me/content/chris-larson/beginners-guide-nodejs-socketio-and-express-framework-first-application) and I get the following error:


Warning: express.createServer() is deprecated, express applications no longer inherit from http.Server, please use:

var express = require("express"); var app = express();

module.js:340 throw err; ^ Error: Cannot find module 'socket.io' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/Users/almeidamarcell/Documents/nodejs/app.js:5:10) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10)


The part that says "Error: Cannot find module 'socket.io'" doesn't mean that socket.io isn't installed?

almeidamarcell avatar May 16 '13 03:05 almeidamarcell

maybe the output got cut in the original report?

rauchg avatar May 16 '13 03:05 rauchg

@guille Sorry? You mean the output I pasted?

almeidamarcell avatar May 16 '13 03:05 almeidamarcell

@almeidamarcell this output from your is a good one. I suppose problem lay in permissions to this module from script. You install this with sudo, so maybe you can't read module files as normal user, and you get your error.

setthase avatar May 16 '13 11:05 setthase

@codename- Hum, I see. Sorry for being such a newbie. How I can fix that then?

almeidamarcell avatar May 20 '13 15:05 almeidamarcell