如何使用最新的NPM在Azure移动服务部署 [英] How to use latest npm on Azure Mobile Service deployment

查看:123
本文介绍了如何使用最新的NPM在Azure移动服务部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我使用目前Azure的移动服务形象被锁定到NPM版本1.2.30。有图像中安装的最新版本的NPM(在... \\程序文件(x86)\\ NPM)​​。但是,NPM被锁定到版本1.2.30,由于它与node.js的安装的原因(在... \\程序文件(x86)\\的NodeJS)和路径始终处于\\看起来的NodeJS \\文件夹第一和用途它。

The Azure Mobile Service image that I am using currently is locked down to npm version 1.2.30. There are latest npm version installed on the image(under ...\Program Files(x86)\npm). But npm is locked down to the version 1.2.30 due to the reason that it was installed with node.js(under ...\Program Files(x86)\nodejs) AND the path always looks under \nodejs\ folder first and uses it.

这是害我在部署中使用的一些NPM包(包括googleapis)的问题。这些错误出现在安装googleapis在旧版本的NPM的错误,并在最新得到解决。

This is causing me problem in using some npm packages (including googleapis) on deployment. The errors appear while installing googleapis are bugs in older version of npm and are resolved in latest.

最简单的办法是删除在'故宫'文件和'npm.cmd'文件... \\程序文件(x86)\\的NodeJS \\文件夹,以便故宫是从读.. \\程序文件(x86) \\故宫\\文件夹中。但我得到拒绝访问错误,而试图访问这些文件。我通过捻接口访问移动服务形象。

The simplest solution is to delete the 'npm' file and 'npm.cmd' file under ...\Program Files(x86)\nodejs\ folder so that the npm is read from ..\Program Files(x86)\npm\ folder. But i get access denied errors while trying to access these files. I am accessing the mobile service image through Kudu interface.

时有工作围绕这个?

推荐答案

有关NPM升级,你可以按照这个论坛的帖子从大卫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\" rel=\"nofollow\">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

For upgrading npm, you can follow the instructions from David Ebbo on this forum post: 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=windowsazurewebsitespreview

这篇关于如何使用最新的NPM在Azure移动服务部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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