Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Your azure function app has functions_worker_runtime set to node while your local project is set to none

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?

like image 980
Keagan Avatar asked Jul 10 '19 13:07

Keagan


People also ask

How do you specify app settings for an Azure functions project during local development?

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.

Which library allows you to develop and test Azure functions locally before deploying into Azure?

Azure Functions Core Tools provides the core runtime and templates for creating functions, which enable local development.

Which version of the Azure functions runtime is required to host a function app in your own custom container?

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.


1 Answers

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.

like image 119
Naresh Babu Avatar answered Nov 23 '22 15:11

Naresh Babu