淋巴结石膏的Node.js应用程序未能在Azure上部署网站 [英] node.js app with node-gyp fails to deploy on azure website

查看:340
本文介绍了淋巴结石膏的Node.js应用程序未能在Azure上部署网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经建立了一个网站的Azure,我尝试使用依赖于节点石膏一个示例应用程序。

I have set up an Azure website and I am trying to use a sample application that relies on node-gyp.

我得到这样的:

emote: > node-expat@2.0.0 install C:\DWASFiles\Sites\node-canvas\VirtualDirectory0\site\wwwroot\node_modules\node-salesforce\node_modules\xml2json\node_modules\node-expat
remote: > node-gyp rebuild
remote: 
remote: 
remote: C:\DWASFiles\Sites\node-canvas\VirtualDirectory0\site\wwwroot\node_modules\node-salesforce\node_modules\xml2json\node_modules\node-expat>node "D:\Program Files (x86)\npm\1.2.18\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild 
remote: Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
remote: MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\DWASFiles\Sites\node-canvas\VirtualDirectory0\site\wwwroot\node_modules\node-salesforce\node_modules\xml2json\node_modules\node-expat\build\binding.sln]
remote: gypnpm ERR! node-expat@2.0.0 install: `node-gyp rebuild`
remote: npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
remote: npm ERR! 
remote: An error has occurred during web site deployment.
remote: npm ERR! Failed at the node-expat@2.0.0 install script.
remote: npm ERR! This is most likely a problem with the node-expat package,
remote: npm ERR! not with npm itself.
remote: npm ERR! Tell the author that this fails on your system:
remote: npm ERR!     node-gyp rebuild
remote: npm ERR! You can get their info via:
remote: npm ERR!     npm owner ls node-expat
remote: npm ERR! There is likely additional logging output above.
remote: 
remote: npm ERR! System Windows_NT 6.2.9200
remote: npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.8.19\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\bin\\npm-cli.js" "install" "--production"
remote: npm ERR! cwd C:\DWASFiles\Sites\node-canvas\VirtualDirectory0\site\wwwroot
remote: npm ERR! node -v v0.8.19
remote: npm ERR! npm -v 1.2.18
remote: npm ERR! code ELIFECYCLE
remote: npm
remote: 
remote: Error - Changes committed to remote repository but deployment to website failed, please check log for further details.
To https://mike@node-canvas.scm.azurewebsites.net:443/node-canvas.git
   ef20ef4..147856f  master -> master

人们是否有一个优雅的解决这个还是我需要旋转起来一个Linux VM,并部署这样的申请?

Do people have a graceful resolution to this or do I need to spin up a linux VM and deploy the application like that?

推荐答案

网站的限制。看到本机模块部分<一个href=\"http://azure.microsoft.com/en-us/documentation/articles/nodejs-use-node-modules-azure-apps/\">http://azure.microsoft.com/en-us/documentation/articles/nodejs-use-node-modules-azure-apps/.

Limitation of web sites. See the native modules section of http://azure.microsoft.com/en-us/documentation/articles/nodejs-use-node-modules-azure-apps/.

解决方法/解决方案是在Windows开发框安装所有组件,包括node_modules作为git的部署的一部分。

The workaround/resolution is to install all the modules on a Windows dev box and include node_modules as part of the git deployment.

这篇关于淋巴结石膏的Node.js应用程序未能在Azure上部署网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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