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.<anonymous> (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