Basically the exercise assume that you are using a 3.x version of the extension bundle, however the default is 4.x. I am not sure why it is not yet working with the new version (4.x) yet as previous version (3.x) will be retired on August 31 2024 (https://learn.microsoft.com/en-us/azure/azure-functions/migrate-cosmos-db-version-3-version-4?tabs=isolated-process&pivots=programming-language-javascript).
Found the fix on 3rd party a forum post, with the following steps
- After the HttpTrigger2 function is created open the function app.
- Click on App Service Editor (and Open Editor)
- Select host.json and change it to this:
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.*, 4.0.0)"
}
}
- Go back to the function app overview and restart the app.
After these steps you should be able to continue with the exercise (as of 16 January 2023).