【问题标题】:Change Node JS version in Azure Mobile Services在 Azure 移动服务中更改 Node JS 版本
【发布时间】:2015-10-17 14:12:32
【问题描述】:

我的 Azure 移动服务在 Node JS 版本 v0.0.28 上运行

{"nodeversion":"v0.8.28"}

我已更改 package.json 以使用安装在 Azure 服务器上的 4.1.0 版,但即使在更改此设置并重新启动服务器后,我仍然看到 v0.8.28。

我什至修改了服务器上的环境变量,但是在重新启动后,它们无论如何都会恢复。

如何更改 Azure 移动服务上的 nodejs 版本?

【问题讨论】:

  • 肖恩·卢廷说得对。无法在 Azure 上升级 NodeJS 版本。但是,您可以创建一个 Azure VM 来安装其他版本的 NodeJS 并在 AMS 中执行您想要执行的操作。
  • 几周内就不需要创建虚拟机了。 Azure Mobile Apps for Node (Mobile Services v2) 在 Web Apps 平台上运行,支持 Node 4.x.x。

标签: javascript node.js azure azure-mobile-services


【解决方案1】:

自 2015 年 7 月 7 日起,您无法在 Azure 移动服务上升级 NodeJS。 See this thread on the Azure Mobile Service forums.

你可以做的是检查你的节点版本:

  1. 转到https://MY_APP.scm.azure-mobile.net/DebugConsole
  2. 运行node -v。
  3. 您可以确切地看到您正在运行的版本。

【讨论】:

  • 谢谢!我正在尝试安装一些需要 .10 或更高版本的节点模块,哦,好吧...
【解决方案2】:

适用于 node.js(Azure 移动应用)的 Azure 移动服务 v2 是开源的,支持任何版本的 node.js。建立在 Express 之上,完全可定制。 Beta 版计划于 2015 年 11 月发布,但现在可用于预发布测试和开发。 Github 项目可用here。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多