我正在尝试使用在 ubuntu 12.04 上本地安装的 Mozilla Persona获得一个简单的站点。但是,我在安装和运行它时遇到了问题。如果我使用从源代码安装的最新版本的 nodejs (0.10.24),我会收到关于找不到 node-waf 的错误消息。
调查这个问题,我发现node-waf 函数在 0.9.1 版本中被删除了。所以我卸载了 0.10.24 并安装了 0.9.0。现在我可以npm install
没有错误,但是当我遇到以下错误时npm start
:
> 123done@0.0.1 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! 123done@0.0.1 start: `node server.js`
npm ERR! `sh "-c" "node server.js"` failed with 1
npm ERR!
npm ERR! Failed at the 123done@0.0.1 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: 123done@0.0.1 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
npm-debug.log 的内容是:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@1.1.44
3 info using node@v0.9.0
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 123done@0.0.1
10 info start 123done@0.0.1
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 123done@0.0.1 Failed to exec start script
15 error 123done@0.0.1 start: `node server.js`
15 error `sh "-c" "node server.js"` failed with 1
16 error Failed at the 123done@0.0.1 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: 123done@0.0.1 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 ]
我对节点相当陌生,所以我一点也不知道这个错误表明什么问题。任何人都有npm start
正确工作的建议吗?