Azure网站上提供了哪些版本的node.js?

时间:2017-08-04 21:00:02

标签: node.js azure azure-web-sites

我已经知道如何change the version of Node.js running on an Azure website了,但是如何看待可以在Azure中使用的可用Node.js版本?

这类似于this question,但那里的提问者明确地想知道当前正在运行的版本,而不是可用的版本。

6 个答案:

答案 0 :(得分:47)

  1. 打开高级工具(Kudu):

    enter image description here

  2. 在Kudu中,点击运行时版本

    enter image description here

  3. 在撰写本文时(2017年8月),您会看到以下内容:

    {
      "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"
        }
      ]
    }
    

    信用转到this blog postthis answer,告诉我如何操作。

答案 1 :(得分:6)

此解决方案以更简洁的格式列出Azure应用服务Web应用的默认支持的Node.js版本

1通过高级工具打开Kudu远程执行控制台

2在Debug Console下,选择PowerShell

3输入以下PowerShell命令以列出Node.js版本

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

答案 2 :(得分:5)

使用Azure CLI最简单:

az webapp list-runtimes

返回:

[
  "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"
]

答案 3 :(得分:2)

可在此处找到可用的WEBSITE_NODE_DEFAULT_VERSION选项:

[您的应用名称] .scm.azurewebsites.net / api / diagnostics / runtime

答案 4 :(得分:0)

我在Linux上使用Application Service Environment。我在门户网站中将Node.js版本设置为10.10。 WEBSITE_NODE_DEFAULT_VERSION的值为10.10 这是我在部署日志中得到的:

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.

这是我在Kudu Bash控制台中运行node --version时得到的:

/home>node --version
v10.14.1

这是版本10.14.1,即使未列出该版本也是如此!但是,它在Azure门户中列出。

当我在同一应用程序上从Kudu运行SSH到容器时:

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

我对于Azure支持哪些版本的Node.js以及实际使用的版本感到非常困惑!

答案 5 :(得分:0)

或转到Configuration,然后转到General settings。谢天谢地,他们使事情变得更加容易。 Microsoft Azure Configuration Screen