Can't really install
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.
What's the error?
@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.
The part that says "Error: Cannot find module 'socket.io'" doesn't mean that socket.io isn't installed?
maybe the output got cut in the original report?
@guille Sorry? You mean the output I pasted?
@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.
@codename- Hum, I see. Sorry for being such a newbie. How I can fix that then?