2015-12-28 82 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