【问题标题】:Azure functions throwing error when trying to debug on MacOS尝试在 MacOS 上调试时 Azure 函数抛出错误
【发布时间】:2021-07-25 08:51:40
【问题描述】:

尝试调试 Azure 函数项目。 在mac上点击F5开始调试。

输出是这样的:

[2021-07-25T08:47:57.429Z] Cannot create directory for shared memory usage: /dev/shm/AzureFunctions
[2021-07-25T08:47:57.434Z] System.IO.FileSystem: Access to the path '/dev/shm/AzureFunctions' is denied. Operation not permitted.
Value cannot be null. (Parameter 'provider')

有没有人遇到过这个问题并且知道如何解决这个问题? 我尝试使用管理员权限运行 Visual Studio 代码,如下所示: sudo open ./Visual\ Studio\ Code.app

还尝试 mkdir /dev/shm 目录,但它只是不断给出这个错误。 我该怎么办?

【问题讨论】:

标签: macos azure azure-functions


【解决方案1】:

解决方案是添加 --verbose 模式并查看日志。问题是 azure 不支持 node 版本 15。将 nodejs 降级到版本 13.12.0 并且它可以工作。

【讨论】:

【解决方案2】:

第 1 步:将 nodejs 降级到 14.x https://nodejs.org/download/release/v14.19.0/

第 2 步:以详细模式运行 打开终端,切换到api文件夹,输入以下命令 func start --verbose

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-02-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-25
    相关资源
    最近更新 更多