npm start fails
I've followed the install instructions, installing impact-fork and copying the "media", "lib", and "tools" directories from impact to node_modules/impact-fork/game/public, navigated to node_modules/impact-fork and ran npm start.
This fails, producing the following error.
npm ERR! [email protected] start: `node ./game/server.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the impact-fork package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./game/server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls impact-fork
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "start"
npm ERR! cwd /Users/chris/Sites/com/node_modules/impact-fork
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.23
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/chris/Sites/com/node_modules/impact-fork/npm-debug.log
npm ERR! not ok code 0
If I run node game/server.js, I get this error.
node_modules/impact-fork/game/server.js:6
app.configure(function(){
^
TypeError: Object function (req, res, next) {
app.handle(req, res, next);
} has no method 'configure'
at Object.<anonymous> (node_modules/impact-fork/game/server.js:6:5)
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)
at startup (node.js:119:16)
at node.js:906:3
I am on Mac OSX 10.9.4 using node v0.10.30.
Any thoughts?
The problem here is that Express 4 does not have a configuration method. You can solve this problem by changing the version of express to an earlier version or removing the call to the configuration method. Note that getting rid of the configuration method is not enough to solve this problem also as there are calls to bodyParser and methodOverride which are no longer bundled with Express and will have to downloaded and required as their own dependencies.