Search code examples
azure-functionsserverlessserverless-offline

Serverless azure offline: value cannot be null. (Parameter 'provider')


I'm experimenting for the first time with serverless functions. More specifically am I writing a nodejs12 function that I want to deploy on the azure cloud.

I'm using serverless for this. When trying to run the default generated functions locally (hello & goodbye) using sls offline, I'm always getting following error:

Value cannot be null. (Parameter 'provider')

While I'm certain this is not null as you can see in my 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

Not sure what the issue is here? I'm using the latest version of serverless (1.71.3) and serverless-azure-functions (2.0.2) and azure-functions-core-tools (2.7.2508).

The full output logs can you find here.

EDIT 1: even with core-tools version 3 it doesn't work. I get the same error.

EDIT 2: I found this issue, but cleaning the cache did not work for me. I'm also on MacOS Catalina.


Solution

  • Apparently it was a bug in serverless-azure-functions which is reported by a dev from azure-functions-core-tools as you can see here.