Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

bcrypt Installation Trouble

Reza Akhavan edited this page Feb 5, 2018 · 4 revisions

For some folks it's not always easy to install the bcrypt module.

If you have issues installing this module, go see the dependencies over at node.bcrypt.js.

Alternatives

You can look for alternatives:

I don't care

I've heard some people have had good experiences with bcryptjs (no native module to compile).

Step #1 - Update /package.json

-  "bcrypt": "1.x.x"
+  "bcryptjs": "2.x.x"

Step #2 - Update require statements

-  const Bcrypt = require('bcrypt');
+  const Bcrypt = require('bcryptjs');
  • server/api/login.js
  • server/models/session.js
  • server/models/user.js

That's it

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