When creating devops pipeline to deploy to Linux webapp NODE:20-lts is unavialable

Babel, Milan 5 Reputation points
2024-01-30T06:09:29.3866667+00:00

In Azure WebServices and with

az webapp list-runtimes --os linux

NODE:20-lts is available, however in an Azure DevOps pipeline task AzureRmWebAppDeployment@4 only offers up to NODE:18-lts which requires manual switch to 20-lts on the resource afterwards. Any way to get 20-lts into the list, or simply not touching this setting at all? Forcing the string to NODE:20-lts in the task will let the AppService fallback to a PHP runtime.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,162 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Orin Eman 5 Reputation points
    2024-03-21T22:13:36.1033333+00:00

    This requires fixing immediately.

    This was just sent out:

    Extended support for Node 18 LTS ends on 30 April 2025 — upgrade your apps to Node 20 LTS

    You’re receiving this email because you use a Node 18 LTS app on Azure App Service.

    On 30 April 2025, extended support for Node 18 LTS will end. Your apps that are hosted on App Service will continue to run, but security updates will no longer be available and we’ll no longer provide customer service for Node 18 LTS. Learn more about App Service language support.

    Required action

    To avoid potential security vulnerabilities and minimize risk for your App Service apps, follow the steps to upgrade your app to Node 20 LTS before 30 April 2025.

    1 person found this answer helpful.
    0 comments No comments

  2. Andriy Bilous 11,011 Reputation points MVP
    2024-01-31T16:54:20.8366667+00:00

  3. Grmacjon-MSFT 17,136 Reputation points
    2024-02-08T03:10:19.15+00:00

    @Babel, Milan The AzureRmWebAppDeployment@4 task is designed to deploy to Azure App Service, supporting various app types including Docker, Java, .NET, .NET Core, Node.js, PHP, Python, and Ruby. However, it seems that the task currently offers up to Node.js 18-lts, which doesn’t align with your requirement for Node.js 20-lts. You can try adding an Azure CLI task to your pipeline after the deployment task:

    • In the Azure CLI task, execute the following command to set the Node.js version to 20-lts for your App Service:
      az webapp config appsettings set --name <your-app-service-name> --resource-group <your-resource-group> --settings WEBSITE_NODE_DEFAULT_VERSION=20-lts
      
    
    • Replace <your-app-service-name> and <your-resource-group> with your actual App Service name and resource group.