Cannot start node site with npm start

2.2k views Asked by At

I am trying to get a simple site using Mozilla Persona installed locally on ubuntu 12.04. However, I ran into problems getting it to install and run. I get an error message about node-waf not found if I am using the latest version of nodejs (0.10.24) installed from source.

Looking into the issue I found that the node-waf function was removed in version 0.9.1. So I uninstalled 0.10.24 and installed 0.9.0. Now I can npm install without error but run into the follow error when I npm start:

> [email protected] start /home/user3188582/123done
> node server.js


module.js:485
  process.dlopen(filename, module.exports);
          ^
Error: Module version mismatch, refusing to load.
    at Object.Module._extensions..node (module.js:485:11)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/home/user3188582/123done/node_modules/client-sessions/node_modules/node-proxy/lib/node-proxy.js:1:90)
    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)
npm ERR! [email protected] start: `node server.js`
npm ERR! `sh "-c" "node server.js"` failed with 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the 123done package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node server.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls 123done
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.2.0-58-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! cwd /home/user3188582/123done
npm ERR! node -v v0.9.0
npm ERR! npm -v 1.1.44
npm ERR! code ELIFECYCLE
npm ERR! stack Error: [email protected] start: `node server.js`
npm ERR! stack `sh "-c" "node server.js"` failed with 1
npm ERR! stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/exec.js:56:20)
npm ERR! stack     at ChildProcess.EventEmitter.emit (events.js:91:17)
npm ERR! stack     at Process._handle.onexit (child_process.js:674:10)
npm ERR! stack     at process.startup.processMakeCallback.process._makeCallback (node.js:238:20)
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/user3188582/123done/npm-debug.log
npm ERR! not ok code 0

The contents of npm-debug.log are:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose config file /home/user3188582/.npmrc
5 verbose config file /usr/local/etc/npmrc
6 verbose config file /usr/local/lib/node_modules/npm/npmrc
7 verbose read json /home/user3188582/123done/package.json
8 verbose run-script [ 'prestart', 'start', 'poststart' ]
9 info prestart [email protected]
10 info start [email protected]
11 verbose unsafe-perm in lifecycle true
12 silly exec sh "-c" "node server.js"
13 silly sh,-c,node server.js,/home/user3188582/123done spawning
14 info [email protected] Failed to exec start script
15 error [email protected] start: `node server.js`
15 error `sh "-c" "node server.js"` failed with 1
16 error Failed at the [email protected] start script.
16 error This is most likely a problem with the 123done package,
16 error not with npm itself.
16 error Tell the author that this fails on your system:
16 error     node server.js
16 error You can get their info via:
16 error     npm owner ls 123done
16 error There is likely additional logging output above.
17 error System Linux 3.2.0-58-generic
18 error command "/usr/local/bin/node" "/usr/local/bin/npm" "start"
19 error cwd /home/user3188582/123done
20 error node -v v0.9.0
21 error npm -v 1.1.44
22 error code ELIFECYCLE
23 error stack Error: [email protected] start: `node server.js`
23 error stack `sh "-c" "node server.js"` failed with 1
23 error stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/exec.js:56:20)
23 error stack     at ChildProcess.EventEmitter.emit (events.js:91:17)
23 error stack     at Process._handle.onexit (child_process.js:674:10)
23 error stack     at process.startup.processMakeCallback.process._makeCallback (node.js:238:20)
24 verbose exit [ 1, true ]

I'm fairly new with node so I haven't the slightest idea what problem this error indicates. Anyone have suggestions for getting npm start to work correctly?

1

There are 1 answers

0
Paul Sweatte On

After completely removing node and installing 0.10.24 I deleted the 123done repo and cloned again. Now I am able to npm install and npm start without any issue