【问题标题】:Serverless azure offline: value cannot be null. (Parameter 'provider')无服务器 Azure 离线:值不能为空。 (参数“提供者”)
【发布时间】:2020-05-21 12:25:53
【问题描述】:

我第一次尝试使用无服务器功能。 更具体地说,我是在编写一个要部署在天蓝色云上的 nodejs12 函数。

我为此使用serverless。当尝试使用 sls offline 在本地运行默认生成的函数(hello & goodbye)时,我总是遇到以下错误:

Value cannot be null. (Parameter 'provider')

虽然我确定这不是空值,正如您在我的 serverless.yml 中看到的那样:

service: test

provider:
  name: azure
  region: North Europe
  runtime: nodejs12

plugins:
  - serverless-azure-functions

package:
  exclude:
    - local.settings.json
    - .vscode/**

functions:
  hello:
    handler: src/handlers/hello.sayHello
    events:
      - http: true
        x-azure-settings:
          methods:
            - GET
          authLevel: anonymous

  goodbye:
    handler: src/handlers/goodbye.sayGoodbye
    events:
      - http: true
        x-azure-settings:
          methods:
            - GET
          authLevel: anonymous

不确定这里的问题是什么?我正在使用最新版本的serverless (1.71.3)serverless-azure-functions (2.0.2)azure-functions-core-tools (2.7.2508)

完整的输出日志你能找到here.

编辑 1: 即使使用 core-tools 版本 3,它也不起作用。我得到同样的错误。

编辑 2: 我找到了 this issue,但清理缓存对我不起作用。我也在 MacOS Catalina 上。

【问题讨论】:

    标签: azure-functions serverless serverless-offline


    【解决方案1】:

    显然这是serverless-azure-functions 中的一个错误,这是由azure-functions-core-tools 的开发人员报告的,您可以看到here.

    【讨论】:

      猜你喜欢
      • 2019-02-27
      • 2021-04-01
      • 1970-01-01
      • 2021-03-28
      • 2015-07-14
      • 1970-01-01
      • 2021-12-31
      • 2015-10-15
      • 2020-06-30
      相关资源
      最近更新 更多