繁体   English   中英

无法在Azure上部署node.js项目,Bcrypt是罪魁祸首

[英]Unable to deploy a node.js project on Azure, Bcrypt is the culprit

我目前正在开发一个部署在Azure上的node.js项目。 我刚刚使用bcrypt添加了密码加密。 在我的测试计算机上一切都很好但是当我在Azure上部署时,部署失败了,我收到了这条消息:

node-gyp rebuild
C:\DWASFiles\Sites\invata\VirtualDirectory0\site\wwwroot\node_modules\bcrypt>node  "D:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-   gyp\bin\node-gyp.js" rebuild 
gypnpm ERR! bcrypt@0.7.6 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
An error has occurred during web site deployment.
npm ERR! 
npm ERR! Failed at the bcrypt@0.7.6 install script.

BCrypt安装有点棘手,因为它需要下载和安装openSSL。 那么有可能在azure上部署这样的模块还是没有希望?

谢谢,Stéphane

经过一番调查,我遇到了另一个bcrypt模块,这个模块是一个本机JS模块,它在Azure上运行完美: https//github.com/shaneGirish/bcrypt-nodejs

我自己刚遇到这个问题。

在寻找过去一小时的解决方案之后,以下对我来说完美无缺:

  1. 转到Web App控制台(可在Web应用程序工具中找到
  2. type: npm install bcrypt

我在命令后没有收到任何输出,但是进入Web App node_modules文件夹,我发现了bcrypt及其所有依赖项。

从那时起,持续部署完美无瑕,希望这有助于其他人!

暂无
暂无

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

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