繁体   English   中英

在Windows Azure上部署节点/ Express应用程序时出错

[英]Error deploying a node/Express app on Windows Azure

我目前正在尝试在Azure上部署Express / Node.js应用,但没有获得太大成功-我遇到的错误如下:

remote: > libxmljs@0.9.0 install D:\home\site\wwwroot\node_modules\libxmljs
remote: > node-gyp rebuild
remote: 
remote: 
remote: D:\home\site\wwwroot\node_modules\libxmljs>node "D:\Program Files (x86)\npm\1.3.11\node_modules\npm\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.  [D:\home\site\wwwroot\node_modules\libxmljs\build\binding.sln]
remote: gypnpm ERR! weird error 1
remote: Failed exitCode=1, command="D:\Program Files (x86)\nodejs\0.10.21\node.exe" "D:\Program Files (x86)\npm\1.3.11\node_modules\npm\bin\npm-cli.js" install --production
remote: An error has occurred during web site deployment.
remote: npm

我认识到Azure实例无法编译libxmljs,因此已从.gitignore文件中排除了libxmljs,该文件如下所示:

!/node_modules/
/node_modules/*
!/node_modules/express/
!/node_modules/libxmljs/
.DS_Store
._*

但我怀疑那仍然无济于事,因为我正在Mac上编译它,然后尝试将其上传到Windows计算机。 有人对我有智慧吗? 谢谢!

您是否尝试过从.gitignore完全删除所有/ node_modules /?

另外,如果您使用的是生成的.gitignore文件,请检查是否忽略了实际的“ express”文件夹。 我必须将其从Visual Studio生成的.gitignore中删除,以实现与node.js应用程序和Azure的持续集成。

如果没有大量的.gitignore按摩工作,请尝试将所有项目文件通过FTP手动上传到服务器,以查看是否启动。 这将告诉您是否是持续集成/ Git或实际应用程序和环境存在问题。

编辑:关于将node.js严格部署到Azure的问题,由于我的应用程序的目录结构,我也遇到了麻烦

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM