0
votes

I want to install BrowserQuest on our Debian server but everytime when I try to start the Server the following error appears:

throw e; // process.nextTick error, or 'error' event on first tick ^ Error: Cannot find module 'underscore' at Function._resolveFilename (module.js:334:15) at Function._load (module.js:281:25) at Module.require (module.js:358:17) at require (module.js:374:17) at Object. (/root/BrowserQuest/server/js/metrics.js:3:9) at Module._compile (module.js:445:26) at Object..js (module.js:463:10) at Module.load (module.js:352:32) at Function._load (module.js:310:12) at Module.require (module.js:358:17)

node 0.7.6 is installed
npm 1.1.8 is installed Debian 8.0

THe BrowserQuest Folder is under /root/BrowserQuest

Thanks

1
Did you run npm install? - ralh

1 Answers

0
votes

The "throw e" message does not reveal the real problem. What really matters should be, I guess, the following messages like "cannot find package underscore", "cannot find package websocket-server", etc. The fact is that you should do "npm install -d " for all those packages.

However the official repository has been out-of-date, so you have to replace websocket-server by node-websocket-server, and some other minor fixes in javascript sources.