Exercise - Publish a function to Azure by using the Core Tools

Sushanta Dinda 41 Reputation points
2021-07-19T01:42:36.217+00:00

I am trying to complete this exercise, however getting this error message "no supported --runtime-version found for the selected --runtime node and --functions-version 2"115676-function-app.png

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,413 questions
0 comments No comments
{count} votes

8 answers

Sort by: Most helpful
  1. Deepan Sankar 81 Reputation points
    2021-07-20T10:28:35.507+00:00

    I had the same issue do I changed to version 3 and force publish the function app

    az functionapp create \
      --resource-group "$RESOURCEGROUP" \
      --name "$FUNCTIONAPP" \
      --storage-account "$STORAGEACCT" \
      --runtime node \
      --consumption-plan-location centralus \
      --functions-version 3
    

    and also

    func azure functionapp publish "$FUNCTIONAPP" --force

    but this is not an exact solution to the problem but helps you to complete the exercise. So, you should report regarding this issue.

    16 people found this answer helpful.

  2. TobiasLoeser 31 Reputation points
    2021-09-04T16:58:26.403+00:00

    I had the same issue and I solved it this way:

    I used --functions-version 3

    For publishing I used --force: func azure functionapp publish "$FUNCTIONAPP" --force

    Since I got a 502 error, I followed the steps mentioned by @ChaitanyaNaykodi-MSFT here and used: az functionapp config appsettings set --name $FUNCTIONAPP --resource-group $RESOURCEGROUP --settings "WEBSITE_NODE_DEFAULT_VERSION=~10"

    6 people found this answer helpful.
    0 comments No comments

  3. MayankBargali-MSFT 70,826 Reputation points
    2021-07-19T09:33:17.207+00:00

    @Sushanta Dinda Can you please share the document that you are following up. If the document is part of MS Learn then I will suggest you to report the issue following this and if the document is part of docs repro then you can create the issue on the specific doc by navigating to the end of the page and creating the issue under github repo.

    It looks like the support is disabled from the Azure CLI end. I couldn't see any breaking changes/release note from the Azure CLI end but I can see that the support was removed from the azure powershell to create V2 function apps.

    Update:
    Looking into the configure for LinuxFunctionsStacks and WindowsFunctionsStacks I can see that for node supportedFunctionsExtensionVersions is only version 3.
    As the support has been removed to create version 2 for node runtime from azure CLI and powershell.

    3 people found this answer helpful.

  4. Brent Gore 6 Reputation points
    2021-08-03T17:19:10.98+00:00
    1 person found this answer helpful.
    0 comments No comments

  5. Zakaria AIT HROCH 6 Reputation points
    2021-08-06T18:56:37.747+00:00
    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.