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! [email protected] 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 [email protected] 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
js uses “bcryptjs”. This module enables storing of passwords as hashed passwords instead of plaintext.
The bcrypt npm package is a JavaScript implementation of the bcrypt password hashing function that allows you to easily create a hash out of a password string . Unlike encryption which you can decode to get back the original password, hashing is a one-way function that can't be reversed once done.
After some investigation, I come across another bcrypt module, this one is a native JS module and it works flawlessly on Azure : https://github.com/shaneGirish/bcrypt-nodejs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With