Upgrading Node on Azure Website?

I am trying to run some pre-deployment tasks (unit tests, etc.) using NPM on the Azure website, however the node version on the virtual machine is v0.10.32, the current version of node is v4. 2.4.

I do not have administrative access to the command line via the SCM website, without RDP, etc.

Is there any way to upgrade?

+17
source share
4 answers

You can tell the version of node that the application is using the package.json file. Add:

"engines":{"node":version}

eg:

"engines":{"node": "0.12.x"}, 

Additional information: https://azure.microsoft.com/en-us/documentation/articles/nodejs-specify-node-version-azure-apps/

+12

, Azure Web node, .

  • .scm.azurewebsites.net
  • (PowerShell CMD)
  • D:\Program Files (x86)\nodejs
  • dir, nodejs.

, 6.3.0, .

// App Setting
WEBSITE_NODE_DEFAULT_VERSION 6.3.0  

// package.json
engines":{"node": "6.3.0"}
+24

2017. .

:

// package.json
engines":{"node": "8.0.0"}

<appSettings>
    <add key="WEBSITE_NODE_DEFAULT_VERSION" value="8.0.0" />
</appSettings>

, iisnode.yml

nodeProcessCommandLine: "D:\Program Files (x86)\nodejs\8.0.0\node.exe"

. , -.

Update

, : App Application Service Image

ftp , iisnode.yml :

iisnode.yml on ftp

+13

NodeJ Azure

- Azure. " " "". WEBSITE_NODE_DEFAULT_VERSION nodejs, .

: WEBSITE_NODE_DEFAULT_VERSION 8.0.0

KfAGH.png

+7

All Articles