Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. 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

like image 521
Whirly Avatar asked Aug 07 '13 14:08

Whirly


People also ask

What is the use of Bcrypt JS module?

js uses “bcryptjs”. This module enables storing of passwords as hashed passwords instead of plaintext.

What is Bcrypt NPM?

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.


1 Answers

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

like image 112
Whirly Avatar answered Sep 25 '22 03:09

Whirly