38

I already know how to change the version of Node.js running on an Azure website, but how do I see what the available Node.js version are that can be used in Azure?

This is similar to this question, but the asker there explicitly wants to know the version that is currently running, not what versions are available.

Michael Kropat
  • 14,557
  • 12
  • 70
  • 91

6 Answers6

64
  1. Open Advanced Tools (Kudu):

    enter image description here

  2. In Kudu, click on Runtime versions:

    enter image description here

At the time of writing (August 2017), you'll see something like this:

{
  "nodejs": [
    {
      "version": "0.10.18",
      "npm": "1.4.28"
    },
    {
      "version": "0.10.21",
      "npm": "1.3.11"
    },
    {
      "version": "0.10.24",
      "npm": "1.4.28"
    },
    {
      "version": "0.10.26",
      "npm": "1.4.28"
    },
    {
      "version": "0.10.28",
      "npm": "1.4.9"
    },
    {
      "version": "0.10.29",
      "npm": "1.4.10"
    },
    {
      "version": "0.10.31",
      "npm": "1.4.28"
    },
    {
      "version": "0.10.32",
      "npm": "1.4.28"
    },
    {
      "version": "0.10.40",
      "npm": "1.4.28"
    },
    {
      "version": "0.10.5",
      "npm": "1.2.18"
    },
    {
      "version": "0.12.0",
      "npm": "2.11.2"
    },
    {
      "version": "0.12.2",
      "npm": "2.11.2"
    },
    {
      "version": "0.12.3",
      "npm": "2.11.2"
    },
    {
      "version": "0.12.6",
      "npm": "2.11.2"
    },
    {
      "version": "0.6.20",
      "npm": "1.1.37"
    },
    {
      "version": "0.8.19",
      "npm": "1.2.30"
    },
    {
      "version": "0.8.2",
      "npm": "1.1.36"
    },
    {
      "version": "0.8.26",
      "npm": "1.2.30"
    },
    {
      "version": "0.8.27",
      "npm": "1.2.30"
    },
    {
      "version": "0.8.28",
      "npm": "1.2.30"
    },
    {
      "version": "4.0.0",
      "npm": "2.14.2"
    },
    {
      "version": "4.1.0",
      "npm": "2.14.4"
    },
    {
      "version": "4.1.2",
      "npm": "2.14.4"
    },
    {
      "version": "4.2.1",
      "npm": "3.3.9"
    },
    {
      "version": "4.2.2",
      "npm": "3.3.12"
    },
    {
      "version": "4.2.3",
      "npm": "3.5.1"
    },
    {
      "version": "4.2.4",
      "npm": "2.14.12"
    },
    {
      "version": "4.3.0",
      "npm": "2.14.12"
    },
    {
      "version": "4.3.2",
      "npm": "2.14.12"
    },
    {
      "version": "4.4.0",
      "npm": "2.15.8"
    },
    {
      "version": "4.4.1",
      "npm": "2.15.8"
    },
    {
      "version": "4.4.6",
      "npm": "2.15.8"
    },
    {
      "version": "4.4.7",
      "npm": "2.15.8"
    },
    {
      "version": "4.5.0",
      "npm": "2.15.9"
    },
    {
      "version": "4.6.0",
      "npm": "2.15.9"
    },
    {
      "version": "4.6.1",
      "npm": "2.15.9"
    },
    {
      "version": "4.8.4",
      "npm": "2.15.11"
    },
    {
      "version": "5.0.0",
      "npm": "3.3.9"
    },
    {
      "version": "5.1.1",
      "npm": "3.3.12"
    },
    {
      "version": "5.3.0",
      "npm": "3.3.12"
    },
    {
      "version": "5.4.0",
      "npm": "3.3.12"
    },
    {
      "version": "5.5.0",
      "npm": "3.3.12"
    },
    {
      "version": "5.6.0",
      "npm": "3.6.0"
    },
    {
      "version": "5.7.0",
      "npm": "3.6.0"
    },
    {
      "version": "5.7.1",
      "npm": "3.6.0"
    },
    {
      "version": "5.8.0",
      "npm": "3.7.3"
    },
    {
      "version": "5.9.1",
      "npm": "3.7.3"
    },
    {
      "version": "6.0.0",
      "npm": "3.8.6"
    },
    {
      "version": "6.1.0",
      "npm": "3.8.6"
    },
    {
      "version": "6.10.0",
      "npm": "3.10.10"
    },
    {
      "version": "6.11.1",
      "npm": "3.10.10"
    },
    {
      "version": "6.2.2",
      "npm": "3.9.5"
    },
    {
      "version": "6.3.0",
      "npm": "3.10.3"
    },
    {
      "version": "6.5.0",
      "npm": "3.10.3"
    },
    {
      "version": "6.6.0",
      "npm": "3.10.3"
    },
    {
      "version": "6.7.0",
      "npm": "3.10.3"
    },
    {
      "version": "6.9.0",
      "npm": "3.10.8"
    },
    {
      "version": "6.9.1",
      "npm": "3.10.8"
    },
    {
      "version": "6.9.2",
      "npm": "3.10.9"
    },
    {
      "version": "6.9.4",
      "npm": "3.10.10"
    },
    {
      "version": "6.9.5",
      "npm": "3.10.10"
    },
    {
      "version": "7.0.0",
      "npm": "3.10.8"
    },
    {
      "version": "7.1.0",
      "npm": "3.10.9"
    },
    {
      "version": "7.10.0",
      "npm": "4.2.0"
    },
    {
      "version": "7.10.1",
      "npm": "4.2.0"
    },
    {
      "version": "7.2.0",
      "npm": "3.10.9"
    },
    {
      "version": "7.3.0",
      "npm": "3.10.10"
    },
    {
      "version": "7.4.0",
      "npm": "4.0.5"
    },
    {
      "version": "7.5.0",
      "npm": "4.1.2"
    },
    {
      "version": "7.6.0",
      "npm": "4.1.2"
    },
    {
      "version": "7.7.4",
      "npm": "4.1.2"
    },
    {
      "version": "8.0.0",
      "npm": "5.0.0"
    },
    {
      "version": "8.1.4",
      "npm": "5.0.3"
    }
  ]
}

Credit goes to this blog post and this answer for showing me how to do it.

Michael Kropat
  • 14,557
  • 12
  • 70
  • 91
18

Using the Azure CLI is easiest:

az webapp list-runtimes

returns:

[
  "aspnet|v4.7",
  "aspnet|v3.5",
  "node|0.6",
  "node|0.8",
  "node|0.10",
  "node|0.12",
  "node|4.8",
  "node|6.12",
  "node|7.10",
  "node|8.4",
  "node|8.5",
  "node|8.9",
  "node|8.10",
  "node|8.11",
  "node|10.0",
  "node|10.6",
  "php|5.6",
  "php|7.0",
  "php|7.1",
  "php|7.2",
  "python|2.7",
  "python|3.4",
  "java|1.7|Tomcat|7.0",
  "java|1.7|Tomcat|8.0",
  "java|1.7|Tomcat|8.5",
  "java|1.7|Tomcat|9.0",
  "java|1.7|Jetty|9.1",
  "java|1.7|Jetty|9.3",
  "java|1.8|Tomcat|7.0",
  "java|1.8|Tomcat|8.0",
  "java|1.8|Tomcat|8.5",
  "java|1.8|Tomcat|9.0",
  "java|1.8|Jetty|9.1",
  "java|1.8|Jetty|9.3"
]
saille
  • 9,014
  • 5
  • 45
  • 57
  • 1
    Sorry, I down voted because this az command gives a completely different list of versions than the Kudu website. Using the versions coming from the az webapp list-runtimes command did not work for WEBSITE_NODE_DEFAULT_VERSION, only the Kudu runtime versions worked for that environment variable. – Benrobot Dec 27 '18 at 18:31
  • @Benrobot this is not true. I was able to set WEBSITE_NODE_DEFAULT_VERSION to 10.6.0 and it worked after testing it in the development console of the web app on the Azure Portal. So this should be the accepted answer. – Dominik Feb 03 '19 at 11:13
  • @Dominik, maybe there's a difference between how the app service is created. In my case I created the app from the portal and the runtime versions given by the az command did not work for me. Since they did work for you I will undo the down vote. EDIT: Site won't let me undo the downvote unless the answer is edited. – Benrobot Feb 03 '19 at 17:01
  • @Benrobot I have created the app service on the portal. I don't know exactly what is happening here, because if I look at the runtimes available in the file system of the web app, there is no 10.0 nor 10.6 but if I configure it through appsettings it works. – Dominik Feb 04 '19 at 08:42
9

Available WEBSITE_NODE_DEFAULT_VERSION options can found here:

https://[your app name].scm.azurewebsites.net/api/diagnostics/runtime

For more details check How to find available node.js versions for Windows Webapps.

sschmeck
  • 7,233
  • 4
  • 40
  • 67
Lars
  • 9,976
  • 4
  • 34
  • 40
  • 5
    This gives nothing atm at least on ASE with Linux containers. an empty array: {"nodejs":[],"system":{"os_name":"Unix 4.4.0.128","os_build_lab_ex":"","cores":1}} – Michael Chudinov Feb 28 '19 at 09:47
7

This solution lists the default supported Node.js versions for a Azure App Service web app in a more succinct format.

1 Open Kudu Remote Execution Console via Advanced Tools

2 Under Debug Console, choose PowerShell

3 Enter the PowerShell commands below to list the Node.js versions

Kudu Remote Execution Console

PS D:\home> cd "D:\Program Files (x86)\nodejs"
PS D:\Program Files (x86)\nodejs> Get-ChildItem -Name -Directory -Exclude node_modules

0.10.18
0.10.21
0.10.24
0.10.26
0.10.28
0.10.29
0.10.31
0.10.32
0.10.40
0.10.5
0.12.0
0.12.2
0.12.3
0.12.6
0.6.20
0.8.19
0.8.2
0.8.26
0.8.27
0.8.28
4.0.0
4.1.0
4.1.2
4.2.1
4.2.2
4.2.3
4.2.4
4.3.0
4.3.2
4.4.0
4.4.1
4.4.6
4.4.7
4.5.0
4.6.0
4.6.1
4.8.4
5.0.0
5.1.1
5.3.0
5.4.0
5.5.0
5.6.0
5.7.0
5.7.1
5.8.0
5.9.1
6.0.0
6.1.0
6.10.0
6.11.1
6.2.2
6.3.0
6.5.0
6.6.0
6.7.0
6.9.0
6.9.1
6.9.2
6.9.4
6.9.5
7.0.0
7.1.0
7.10.0
7.10.1
7.2.0
7.3.0
7.4.0
7.5.0
7.6.0
7.7.4
8.0.0
8.1.4
juvchan
  • 6,113
  • 2
  • 22
  • 35
  • 2
    Definitely re-run this command to find the latest supported versions. As of April 2018, these were added:8.0.0 8.10.0 8.4.0 8.5.0 8.7.0 8.8.0 8.8.1 8.9.0 8.9.3 8.9.4 – mogile_oli Apr 04 '18 at 14:38
7

Or go to Configuration and then General settings. Thank goodness they made that easier. Microsoft Azure Configuration Screen

Mr Rogers
  • 6,091
  • 2
  • 32
  • 34
  • 1
    After sifting through dozens of SO posts, web blogs, and documentation pages, this simple answer was the deal of the day, Thank you Rogers! – ISAE May 26 '21 at 21:49
2

I use Application Service Environment with Linux. I set Node.js version to 10.10 in portal. The WEBSITE_NODE_DEFAULT_VERSION value is 10.10 Here is what I get in deployment logs:

Using appsetting WEBSITE_NODE_DEFAULT_VERSION value: 10.10
Node.js versions available on the platform are: 4.4.7, 4.5.0, 6.2.2, 6.6.0, 6.9.3,   6.10.3, 6.11.0, 8.0.0, 8.1.0, 8.2.1, 8.8.1, 8.9.4, 8.11.2, 9.4.0, 10.1.0.
Could not resolve node version. Deployment will proceed with default versions of node and npm.

And here is what I get when I run node --version in Kudu Bash console:

/home>node --version
v10.14.1

It is version 10.14.1 even it is not listed as available! However it is listed in Azure portal.

When I run SSH to container from Kudu on the same application:

 0517c643ed59:~# node --version
 v10.10.0

I'm really confused about what versions of Node.js are supported by Azure and what are actually in use!

Michael Chudinov
  • 2,620
  • 28
  • 43