-
Notifications
You must be signed in to change notification settings - Fork 569
bcrypt Installation Trouble
For some of us it's not always easy to install the bcrypt
module.
$ npm install bcrypt --save
If you have issues installing this module, go see the dependencies over at ncb000gt/node.bcrypt.js. I suggest you try getting this working before using an alternative method. Who knows, it might just further enlighten you as a developer.
If you find a problem with "node-gyp" then follow the various installation procedures of node-gyp. node-gyp is a Node.js native addon build tool, essential for bcrypt installation.
There have been requests for Drywall to use alternative modules instead. Some other modules are:
Some of the reasons I chose bcrypt
are:
- it's repo has few open issues with over 200 closed
- it's been updated relatively recently and seems to be more actively supported
- the maintainers are trusted in the community
I'm not a security expert, but bcrypt-nodejs
's docs say:
Native JS implementation of BCrypt for Node. Has the same functionality as node.bcrypt.js expect for a few tiny differences. Mainly, it doesn't let you set the seed length for creating the random byte array.
... and those tiny differences could mean a lot to someone who knows more than I do about security.
Ok cool. I just wanted you to know that stuff before blindly swapping the modules out. It's really easy to do anyways.
- "bcrypt": "~0.7.7"
+ "bcryptjs": "~0.7.12"
One occurrence. Version numbers may be different.
- var bcrypt = require('bcrypt');
+ var bcrypt = require('bcryptjs');
- var bcrypt = require('bcrypt');
+ var bcrypt = require('bcryptjs');
Two occurrences.
See that wasn't so hard. And now you know all this great stuff about bcrypt
. 🤘
I hope this was helpful. If you have questions or think this page should be expanded please contribute by opening an issue or updating this page.