1
votes

When trying to test a node.js Azure function app locally that uses durable entities, I'm seeing the following messages that these bindings aren't registered:

The binding type(s) 'entityTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.
The binding type(s) 'durableClient' are not registered. Please ensure the type is correct and the binding extension is installed.

My host.json looks like this:

{
  "version": "2.0",
  "extensions": {
      "durableTask": {},
      "http": {},
      "queues": {},
      "serviceBus": {}
  },
  "extensionBundle": {
      "id": "Microsoft.Azure.Functions.ExtensionBundle",
      "version": "[1.*, 2.0.0)"
  }
}

Example binding for one of the functions:

{
  "bindings": [
    {
      "name": "context",
      "type": "entityTrigger",
      "direction": "in"
    }
  ],
  "disabled": false
}

Other durable functions bindings like orchestrationTrigger are registered but not these. I have durable-functions npm package 1.4.1 installed as well as Azure Functions Core Tools 3.0.2534. Struggling to get this working with the lack of JS reference material and would be eternally grateful for some help.

1

1 Answers

2
votes

So the reason for this is the extensionBundle configuration of your host.json. Currently, extension bundles only support version 1.x of the Durable Functions extension, which does not support entities. However, in the near future there will be a second version of the extension bundle that ships with Durable Functions 2.x, which introduces Durable Entity support. At that point, you will just change the "version" field to "[2.*, 3.0.0)".

Note that you can use Durable Entities now by manually managing the Durable Functions extensions with the Azure Functions CLI. Just remove the extension bundle section of your host.json, and run the following command for each Azure Functions extension you want to install:

func extensions install -p <nuget-package-name> -v <version>

You can find the official extensions and their latest versions by looking at nuget.org.