Azure App Service deploy version 4 not showing node 20 in runtime stack

Ronak Patel 0 Reputation points
2024-12-31T11:33:18.0233333+00:00

I am upgrading my Node.js application to version 20 and have integrated an Azure pipeline for deployment.

In the Azure portal, under Settings > Configuration > General Settings > Stack Settings, I updated the Node.js version to 20. However, in the Azure pipeline, I am using the Azure App Service Deploy task to deploy my back-end. In this task, I am u

nable to find Node.js 20 listed in the runtime stack options.

If I set the Node.js version to 20 in the portal configuration but do not update it in the Azure App Service Deploy task, the runtime stack reverts to Node.js 18 during deployment.Screenshot from 2024-12-31 17-00-37Screenshot from 2024-12-31 16-53-15

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,216 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Shree Hima Bindu Maganti 2,415 Reputation points Microsoft Vendor
    2025-01-03T18:55:58.08+00:00

    Hi Ronak Patel
    Welcome to the Microsoft Q&A Platform!
    You're encountering an issue where the Azure App Service Deploy task in your pipeline doesn't list Node.js 20 as an available runtime stack, causing deployments to revert to Node.js 18.
    Update the Azure App Service Deploy Task:

    Ensure you're using the latest version of the Azure App Service Deploy task in your pipeline, as older versions may not support Node.js 20.

    Set the Node.js Version Using Azure CLI.

    Incorporate an Azure CLI task in your pipeline to explicitly set the Node.js version to 20 for your App Service.

    - task: AzureCLI@2
      inputs:
        azureSubscription: '<YourAzureSubscription>'
        scriptType: 'bash'
        scriptLocation: 'inlineScript'
        inlineScript: |
          az webapp config set --resource-group <ResourceGroupName> --name <AppName> --linux-fx-version "NODE|20"
    

    Replace <YourAzureSubscription>, <ResourceGroupName>, and <AppName> with your actual Azure subscription, resource group, and app name.

    Add the WEBSITE_NODE_DEFAULT_VERSION setting to your App Service to specify the Node.js version.

    - task: AzureAppServiceSettings@1
      inputs:
        azureSubscription: '<YourAzureSubscription>'
        appName: '<YourAppName>'
        appSettings: |
          [
            {
              "name": "WEBSITE_NODE_DEFAULT_VERSION",
              "value": "20"
            }
          ]
    

    This configuration ensures that your App Service uses Node.js version 20.

    Confirm that Azure App Service in your region supports Node.js 20.

    As of November 2024, Azure App Service has announced support for Node.js 20.
    If the Azure App Service Deploy task doesn't list Node.js 20, consider raising a support ticket or providing feedback to Microsoft to address this discrepancy.
    If the answer is helpful, please click Accept Answer and kindly upvote it


  2. Robin Joseph 0 Reputation points
    2025-01-21T13:57:15.64+00:00

    Hello, Is there any update on this issue? I am also facing similar issue.

    Node 20 Runtime stack not showing up on both Azure App Service deploy and Azure Web App steps

    User's image

    User's image


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.