El módulo websocket de node.js está instalado pero no funcionará en scripts
Acabo de instalar node.js + microsoft visual para poder instalar el websocket, se instaló bien:
C:\Users\Administrator>npm install websocket
npm http GET https://registry.npmjs.org/websocket
npm http 304 https://registry.npmjs.org/websocket
> websocket@1.0.8 install C:\Users\Administrator\node_modules\websocket
> node install.js
[websocket v1.0.8] Attempting to compile native extensions.
[websocket v1.0.8] Native extension compilation successful!
websocket@1.0.8 node_modules\websocket
C:\Users\Administrator>
Ahora estoy tratando de ejecutar un script con esto:
var WebSocketServer = require('websocket').Server;
y me sale esto:
C:\Users\Administrator>node C:\server\src\main.js
module.js:340
throw err;
^
Error: Cannot find module 'websocket'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (C:\server\src\main.js:2:23)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
C:\Users\Administrator>
Cualquier ayuda sería apreciada, ya intenté instalarlo varias veces, intenté instalarlo globalmente (etiqueta -g).