[英]Unable to deploy a node.js project on Azure, Bcrypt is the culprit
I am currently working on a node.js project which is deployed on Azure. 我目前正在开发一个部署在Azure上的node.js项目。 I just added password encryption using bcrypt. 我刚刚使用bcrypt添加了密码加密。 Everything is fine on my test computer but when I deploy on Azure, the deployment failed and I've got this message : 在我的测试计算机上一切都很好但是当我在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 installation is a bit tricky as it required to download and install openSSL. BCrypt安装有点棘手,因为它需要下载和安装openSSL。 So is there a possibility to deploy such module on azure or is it hopeless ? 那么有可能在azure上部署这样的模块还是没有希望?
Thanks, Stéphane 谢谢,Stéphane
经过一番调查,我遇到了另一个bcrypt模块,这个模块是一个本机JS模块,它在Azure上运行完美: https : //github.com/shaneGirish/bcrypt-nodejs
I just encountered this problem myself. 我自己刚遇到这个问题。
After searching for a solution for the past hour, the following worked flawlessly for me: 在寻找过去一小时的解决方案之后,以下对我来说完美无缺:
npm install bcrypt
type: npm install bcrypt
i received no output following the command, but going into the Web App node_modules folder i found bcrypt and all its dependencies there. 我在命令后没有收到任何输出,但是进入Web App node_modules文件夹,我发现了bcrypt及其所有依赖项。
continuous deployment worked flawlessly ever since, hope this helps others! 从那时起,持续部署完美无瑕,希望这有助于其他人!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.