javascript - Trying to set a hub server for togetherjs application and i am using node.js to run the server i get the following error -
error: cannot find module 'websocket-server' @ function.module._resolvefilename (module.js:336:15) @ function.module._load (module.js:286:25) @ module.require (module.js:365:17) @ require (module.js:384:17) @ object. (d:\rahul\hubserver\togetherjs-develop\togetherjs-develop\hub\websocket-compat.js:27:28) @ module._compile (module.js:434:26) @ object.module._extensions..js (module.js:452:10) @ module.load (module.js:355:32) @ function.module._load (module.js:310:12) @ module.require (module.js:365:17)
that means have not installed module.
npm install websocket-server
usually instead of doing manually have package.json
file , can install modules doing npm install
i'd want save websocket-server package run command:
npm install websocket-server --save
remember npm install __
in directory of site is. otherwise node won't find it.
Comments
Post a Comment