我正在尝试使用在ubuntu 12.04上本地安装的Mozilla Persona来获得一个简单的site。但是,我遇到了安装和运行它的问题。如果我使用从源安装的最新版本的nodejs(0.10.24),我收到有关找不到node-waf的错误消息。
在版本0.9.1中查看问题found已删除node-waf函数。所以我卸载了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
正常使用吗?
答案 0 :(得分:1)
完全删除节点并安装0.10.24后,我删除了123done repo并再次克隆。现在我能够npm install和npm start没有任何问题