升级Azure网站上的Node? [英] Upgrading Node on an Azure website?

查看:66
本文介绍了升级Azure网站上的Node?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Azure网站上使用NPM运行一些预部署任务(单元测试等),但是VM上的节点版本为v0.10.32,当前节点版本为v4.2.4.

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 v4.2.4.

我无法通过SCM网站以非管理方式访问命令行,也没有RDP等.

I have non administrative access to the command line via the SCM website, no RDP etc.

有什么方法可以升级吗?

Is there any way to upgrade?

推荐答案

您可以使用package.json文件指定运行应用程序的节点的版本.添加:

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

"engines":{"node":version}

例如:

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

更多信息: https://azure.microsoft .com/en-us/documentation/articles/nodejs-specify-node-version-azure-apps/

这篇关于升级Azure网站上的Node?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆