14

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?

Keagan
  • 141
  • 1
  • 1
  • 3

1 Answers1

24

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.

Naresh Babu
  • 702
  • 1
  • 7
  • 17
  • 2
    Even after almost a full year, this helped me out (although in my case it was --python). Thanks! – JarroVGIT Aug 13 '20 at 05:47
  • 3
    To extend this further the available options seem to be as follows: `--csharp, --javascript, --typescript, --java, --python, --powershell, --custom` – Matthew Champion Dec 23 '20 at 17:04