一切都按照说明进行配置。npm start 启用服务器,但是当我打开 URL localhost:PORT 时,它会断开连接并显示 Invalid StatusCode 错误
C:\Temp\conversation-simple-master>npm start
> conversation-simple@0.1.1 start C:\Temp\conversation-simple-master
> node server.js
Server running on port: 81
_http_server.js:192
throw new RangeError(`Invalid status code: ${statusCode}`);
^
RangeError: Invalid status code: 0
at ServerResponse.writeHead (_http_server.js:192:11)
at ServerResponse._implicitHeader (_http_server.js:157:8)
at ServerResponse.OutgoingMessage.end (_http_outgoing.js:573:10)
at ServerResponse.send (C:\Temp\conversation-simple-master\node_modules\expr
ess\lib\response.js:204:10)
at ServerResponse.json (C:\Temp\conversation-simple-master\node_modules\expr
ess\lib\response.js:249:15)
at C:\Temp\conversation-simple-master\app.js:88:44
at Request._callback (C:\Temp\conversation-simple-master\node_modules\watson
-developer-cloud\lib\requestwrapper.js:55:7)
at self.callback (C:\Temp\conversation-simple-master\node_modules\watson-dev
eloper-cloud\node_modules\request\request.js:187:22)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! conversation-simple@0.1.1 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the conversation-simple@0.1.1 start script 'node server.js'.
npm ERR! This is most likely a problem with the conversation-simple 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 information on how to open an issue for this project with:
npm ERR! npm bugs conversation-simple
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls conversation-simple
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Temp\conversation-simple-master\npm-debug.log
需要知道问题出在哪里或在哪里可以检查状态代码。
该网站正在显示 UI,但未显示响应。