Watson Conversation - NPM Start断开连接并显示无效StatusCode的错误

时间:2016-11-16 11:21:59

标签: node.js watson-conversation watson

根据说明配置所有内容。 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

需要知道问题的位置或我在哪里可以查看状态代码。

该网站正在显示用户界面,但未显示回复。

1 个答案:

答案 0 :(得分:0)

这只是因为互联网连接到API调用。虽然在本地主机中它正在工作但是当连接到SSL时它有问题。

仅仅因为互联网认证客户端。