首页 > 解决方案 > Azure 函数在 500 上失败 - ENOENT:没有这样的文件或目录,lstat 'D:\home\site''

问题描述

Azure 功能开始失败,原因如下:

Result: Failure
Exception: Worker was unable to load function StartStopVms: 'Error: ENOENT: no such file or directory, lstat 'D:\home\site''
Stack: Error: ENOENT: no such file or directory, lstat 'D:\home\site'
    at Object.realpathSync (fs.js:1461:7)
    at toRealPath (internal/modules/cjs/loader.js:241:13)
    at Function.Module._findPath (internal/modules/cjs/loader.js:310:24)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:633:25)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at FunctionLoader.load (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12858\32bit\workers\node\worker-bundle.js:18562:22)

可能是什么原因?这是一个部署在windows上的nodejs函数。它设置为“从 zip 运行”(代码位于 blob 存储中)。它一直工作到昨天。函数的代码没有变化。

谢谢。

标签: azureazure-functions

解决方案


请转到您的函数应用并单击“平台功能”->“高级工具(Kudu)”->“调试控制台”->“CMD”以检查“站点”是否存在。 在此处输入图像描述


推荐阅读