2015-12-28 57 views
0

我刚刚生成了一个带有快速生成器的服务器。当我启动服务器并给出它是第一个请求时,我得到这个错误。node.js/Express服务器根据请求崩溃

0 info it worked if it ends with ok 
1 verbose cli [ '/Users/user/.nvm/versions/node/v4.2.4/bin/node', 
1 verbose cli '/Users/user/.nvm/versions/node/v4.2.4/bin/npm', 
1 verbose cli 'start' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose run-script [ 'prestart', 'start', 'poststart' ] 
5 info lifecycle [email protected]~prestart: [email protected] 
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing 
7 info lifecycle [email protected]~start: [email protected] 
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 
9 verbose lifecycle [email protected]~start: PATH: /Users/user/.nvm/versions/node/v4.2.4/lib/node_modules/npm/bin/node-gyp-bin:/Users/user/Projects/sevn/node_modules/.bin:/Users/user/.nvm/versions/node/v4.2.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin 
10 verbose lifecycle [email protected]~start: CWD: /Users/user/Projects/sevn 
11 silly lifecycle [email protected]~start: Args: [ '-c', 'node ./bin/www' ] 
12 silly lifecycle [email protected]~start: Returned: code: 1 signal: null 
13 info lifecycle [email protected]~start: Failed to exec start script 
14 verbose stack Error: [email protected] start: `node ./bin/www` 
14 verbose stack Exit status 1 
14 verbose stack  at EventEmitter.<anonymous> (/Users/user/.nvm/versions/node/v4.2.4/lib/node_modules/npm/lib/utils/lifecycle.js:232:16) 
14 verbose stack  at emitTwo (events.js:87:13) 
14 verbose stack  at EventEmitter.emit (events.js:172:7) 
14 verbose stack  at ChildProcess.<anonymous> (/Users/user/.nvm/versions/node/v4.2.4/lib/node_modules/npm/lib/utils/spawn.js:24:14) 
14 verbose stack  at emitTwo (events.js:87:13) 
14 verbose stack  at ChildProcess.emit (events.js:172:7) 
14 verbose stack  at maybeClose (internal/child_process.js:818:16) 
14 verbose stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 
15 verbose pkgid [email protected] 
16 verbose cwd /Users/user/Projects/sevn 
17 error Darwin 15.2.0 
18 error argv "/Users/user/.nvm/versions/node/v4.2.4/bin/node" "/Users/user/.nvm/versions/node/v4.2.4/bin/npm" "start" 
19 error node v4.2.4 
20 error npm v3.5.2 
21 error code ELIFECYCLE 
22 error [email protected] start: `node ./bin/www` 
22 error Exit status 1 
23 error Failed at the [email protected] start script 'node ./bin/www'. 
23 error Make sure you have the latest version of node.js and npm installed. 
23 error If you do, this is most likely a problem with the sevn package, 
23 error not with npm itself. 
23 error Tell the author that this fails on your system: 
23 error  node ./bin/www 
23 error You can get information on how to open an issue for this project with: 
23 error  npm bugs sevn 
23 error Or if that isn't available, you can get their info via: 
23 error  npm owner ls sevn 
23 error There is likely additional logging output above. 
24 verbose exit [ 1, true ] 

出了什么问题?我在哪里可以开始调试?

顺便说一句,我的Node.js版本V4.2.4和NPM v.3.5.2

谢谢!

编辑:我得到304状态,不应该得到200吗?

+0

你可以分享你的代码 –

+0

共享代码@Rick –

+0

不知道什么,分享什么。从express-generate生成后,我没有做任何更改。也许路线?或app.js? –

回答

0

问题是我没有安装我用于快速服务器的指南针。

问题的解决:

gem install compass