2.0似乎在Azure上投放的静态文件已损坏

时间:2019-08-12 23:35:28

标签: node.js azure express azure-function-app

我的功能应用程序中包含以下代码:

app.use("/", express.static("www"));

这将导致以下运行时异常:

2018-09-07T22:14:29.829 [Info] Function started (Id=65d1f81f-f1ed-4d9f-844e-7fdcae8cf5c6)
2018-09-07T22:14:31.782 [Error] A ScriptHost error has occurred
2018-09-07T22:14:31.782 [Error] System.InvalidOperationException : TypeError: Cannot read property 'length' of null
    at ServerResponse.OutgoingMessage._send (_http_outgoing.js:137:38)
    at ServerResponse.OutgoingMessage.write (_http_outgoing.js:491:16)
    at ReadStream.ondata (_stream_readable.js:555:20)
    at emitOne (events.js:96:13)
    at ReadStream.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at ReadStream.Readable.push (_stream_readable.js:134:10)
    at onread (fs.js:2018:12)
    at FSReqWrap.wrapper [as oncomplete] (fs.js:682:17)

请注意对OutgoingMessage继承的新方法的调用。

我不确定这里发生了什么,但是我认为当从NativeOutgoingMessage派生更改时,这种情况开始中断。你知道发生了什么吗?您对可以代替什么有建议吗?

谢谢。

0 个答案:

没有答案