I am currently working on a node.js project which is deployed on Azure. I just added password encryption using bcrypt. Everything is fine on my test computer but when I deploy on Azure, the deployment failed and I've got this message :
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. So is there a possibility to deploy such module on azure or is it hopeless ?
Thanks, 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
i received no output following the command, but going into the Web App node_modules folder i found bcrypt and all its dependencies there.
continuous deployment worked flawlessly ever since, hope this helps others!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.