作者:qk墨砚轩 | 来源:互联网 | 2023-09-06 12:43
1)_http_outgoing.js:314_http_outgoing.js:314thrownewTypeError(^TypeError:Headernamemustbea
1)_http_outgoing.js:314
_http_outgoing.js:314
throw new TypeError(
^
TypeError: Header name must be a valid HTTP Token ["Content-Type"]
at storeHeader (_http_outgoing.js:314:11)
at ServerResponse.OutgoingMessage._storeHeader (_http_outgoing.js:228:9)
at ServerResponse.writeHead (_http_server.js:221:8)
at Server. (E:\nodejs\http_modules.js:5:6)
at emitTwo (events.js:106:13)
at Server.emit (events.js:191:7)
at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:546:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
出现这个错误,检查一下Content-Type有没有拼写性低级错误。
2)_http_outgoing.js:351
http_server版本低,升级http_server的命令行指令: npm update -g http_server