如何使用最新版本的的NodeJS在Azure移动服务运行时 [英] How to use latest version of nodejs on azure mobile-service runtime
问题描述
我试图整合谷歌API-的NodeJS客户端移动服务。我得到以下运行时错误试图使用从googleapis样品code:
I am trying to integrate google-api-nodejs-client with azure mobile-services. I get following runtime error trying to use sample code from googleapis:
Error: Unable to load endpoint plus("v1"): Cannot read property 'prototype' of undefined
此错误似乎是<一个href=\"http://stackoverflow.com/questions/25579734/nodejs-google-api-module-typeerror-cannot-read-property-prototype-of-und\">due理性的googleapis唯一支持版本的NodeJS 0.10和更高,而蔚蓝的移动服务正在运行版本的NodeJS 0.8.28。
This error seems to be due to reason that googleapis only support nodejs version 0.10 and higher, whereas azure mobile-services are running nodejs version 0.8.28.
有没有一种方法,我可以用更多的最新版本在Azure移动服务的的NodeJS?
Is there a way I can use more latest version of nodejs on azure mobile-service?
推荐答案
由David Ebbo上<建议的一种解决方法href=\"https://social.msdn.microsoft.com/Forums/azure/en-US/068ef026-f80d-4bf8-9f40-5d1af33a1024/git-deployment-fails-with-npm-error-when-resolving-a-package-version-containing-a-?forum=windowsazurewebsites$p$pview&prof=required\"相对=nofollow> Azure支持网站
A workaround suggested by David Ebbo on Azure Support Site
您可能想尝试这样的事情作为一种解决方法:
You may want to try something like this as a workaround:
在回购协议的根源,你会发现有一个.deployment文件:
at the root of the repo, you'll find a .deployment file that has:
[config]
command = ..\ZumoDeploy.cmd
将其更改为
[config]
command = deploy.cmd
和接下来创建一个deploy.cmd它包含:
And create a deploy.cmd next to it containing:
set NPM_JS_PATH=%ProgramFiles(x86)%\npm\1.4.9\node_modules\npm\bin\npm-cli.js
..\ZumoDeploy.cmd
提交文件和推动。
Commit both files and push.
这篇关于如何使用最新版本的的NodeJS在Azure移动服务运行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!