Ok I give up. Why does Azure have some default version of node (0.10.x for gawds sake) and then relies on using hard-coded paths for the specific version required? That wa
There is a wiki page Node versioning of Project Kudu for Azure WebApps which can answer your question about Node version. Before Oct 31, 2017 when the wiki page be edited, the default node version is v0.6.20
, now it is 0.10.40
. It seems to be up to the deployment template of Azure WebApps.
After your webapp was created, you can configure the value of Azure Website environment variable WEBSITE_NODE_DEFAULT_VERSION
to change the default Node version in the tab Application settings
of Azure portal, as the figure below, like the subsection Change the Node version of the wiki page Configurable settings
said.
About the all available Node versions in Azure WebApps, you can command ls
under the path D:\Program Files (x86)\nodejs
of Kudu console to list them as the figure below.
After you set the WEBSITE_NODE_DEFAULT_VERSION
, your website will autorestart and the Node version has been upgraded.
Then you can make your script works directly on the current Node version, without considering for these environment variables like PATH
or others about Node.