Closed ItWasEnder closed 11 months ago
Hi @EnderGamingFilms can you make sure you have a local.settings.json file with FUNCTIONS_WORKER_RUNTIME
set to node
I can't believe I didn't notice that file was missing. Completely my bad 🤝
For anyone searching the internet struggling - in my case I had to update my host.json
to this:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[4.*, 5.0.0)"
}
}
https://johnnyreilly.com/migrating-azure-functions-node-js-v4-typescript#3-running-locally
Hi @johnnyreilly cool blog post! Always nice to see real-life scenarios, as opposed to our official docs which are a bit more generic.
In terms of the host.json, I don't think you should need to update it to get local debugging to work. It depends what your host.json was before and what types of triggers you have in your app. If you want, feel free to file a new issue in the node.js repo and we can follow up: https://github.com/Azure/azure-functions-nodejs-library/issues/new
Hey @ejizba!
I'll try and reverse my change tomorrow and see if that does reliably break local debugging - if it does then I'll report back!
So it's the weirdest thing. I spent literally hours being unable to run locally. I changed the host.json
as suggested in https://johnnyreilly.com/migrating-azure-functions-node-js-v4-typescript#3-running-locally and I was able to run locally. I just tried changing it back locally and it still runs locally?! I cannot explain this!
I've updated the blog post to reference this discussion BTW
Haha I've been there. Just let us know if you ever get a repro of your old issue
Will do!
Hello all. I have set up a function app using v4 for nodeJS (TypeScript) and everything has worked fine until today when I was setting up some new environments. I am currently unable to run my v4 functions for some reason. I have tried following the v4 upgrade guide to try and diagnose the issue. In short, this did not work.
I have tried running
npm run start
as well as building the project and thenfunc start
however each mother yields the same result.4.0.5441
[3.*, 4.0.0)
^4.0.0
Here is the console error that is given with either command:
And below is my function.
package.json