Upgrading Node on an Azure website?

后端 未结 4 1539
小鲜肉
小鲜肉 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条回答
  •  庸人自扰
    2020-11-30 09:34

    You can specify the version of node that the app is running on using the package.json file. Add:

    "engines":{"node":version}
    

    e.g.:

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

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

提交回复
热议问题