簡體   English   中英

node.js / Express服務器在請求時崩潰

[英]node.js/Express server crashes on request

我剛剛用express-generator生成了一個服務器。 當我啟動服務器並給出第一個請求時,出現此錯誤。

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 npm@3.5.2
3 info using node@v4.2.4
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle sevn@0.0.0~prestart: sevn@0.0.0
6 silly lifecycle sevn@0.0.0~prestart: no script for prestart, continuing
7 info lifecycle sevn@0.0.0~start: sevn@0.0.0
8 verbose lifecycle sevn@0.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle sevn@0.0.0~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 sevn@0.0.0~start: CWD: /Users/user/Projects/sevn
11 silly lifecycle sevn@0.0.0~start: Args: [ '-c', 'node ./bin/www' ]
12 silly lifecycle sevn@0.0.0~start: Returned: code: 1  signal: null
13 info lifecycle sevn@0.0.0~start: Failed to exec start script
14 verbose stack Error: sevn@0.0.0 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 sevn@0.0.0
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 sevn@0.0.0 start: `node ./bin/www`
22 error Exit status 1
23 error Failed at the sevn@0.0.0 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嗎?

問題是我沒有安裝用於快遞服務器的指南針。

解決問題的方法:

gem install compass

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM