I have a node function app that runs fine locally and when deployed. However, I receive the error : Your azure function app has functions_worker_runtime set to node while your local project is set to none and am unable to deploy it if I don't check in local.settings.json which has the FUNCTIONS_WORKER_RUNTIME set to node. My arm template app settings has the FUNCTIONS_WORKER_RUNTIME set to node.
I've tried setting an environment variable during deployment, but it seems like it is reading it out of local settings?
How can I deploy this without checking in the local.settings.json file?
To find the application settings, see Get started in the Azure portal. The Application settings tab maintains settings that are used by your function app. You must select Show values to see the values in the portal. To add a setting in the portal, select New application setting and add the new key-value pair.
Azure Functions Core Tools provides the core runtime and templates for creating functions, which enable local development.
NET 6.0, which is required by version 4. x of the runtime. . NET 6 is required for function apps in any language running on Windows.
I encountered the same error when publishing a function using below command from Travis CI build.
func azure functionapp publish
<APP_NAME>
Error:
Your Azure Function App has 'FUNCTIONS_WORKER_RUNTIME' set to 'node' while your local project is set to 'None'.
You can pass --force to update your Azure app with 'None' as a 'FUNCTIONS_WORKER_RUNTIME'
Resolved it by specifying the language in-line as below,
func azure functionapp publish
<APP_NAME>
--typescript
Strangely, the publish options listed in documentation doesn't mention this option. Was able to figure it out with the help of a hint that came along with the error message above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With