Upgrading Node on an Azure website?

后端 未结 4 1545
小鲜肉
小鲜肉 2020-11-30 09:06

I\'m trying to run some pre deployment tasks (unit tests etc) with NPM on an Azure website, however the version of node on the VM is v0.10.32, the current version of node is

4条回答
  •  旧时难觅i
    2020-11-30 09:16

    Ensure the Azure Web App has the node version you want.

    1. Go to yoursite.scm.azurewebsites.net
    2. Choose Debug Console (PowerShell or CMD)
    3. Navigate to D:\Program Files (x86)\nodejs
    4. Run dir to see the available nodejs versions.

    For instance, if there is a directory named 6.3.0, then you can use it.

    // App Setting
    WEBSITE_NODE_DEFAULT_VERSION 6.3.0  
    
    // package.json
    engines":{"node": "6.3.0"}
    

提交回复
热议问题