When I try to login a user using bcrypt.compare to compare passwords, this error message show up in my terminal.
dyld: lazy symbol binding failed: Symbol not found: __ZN4node19GetCurrentEventLoopEPN2v87IsolateE
Referenced from: /pathTo/node_modules/bcrypt/lib/binding/bcrypt_lib.node
Expected in: flat namespace
dyld: Symbol not found: __ZN4node19GetCurrentEventLoopEPN2v87IsolateE
Referenced from: /pathTo/node_modules/bcrypt/lib/binding/bcrypt_lib.node
Expected in: flat namespace
I am using node.js and express.
That's how I've solve it. If this happen to you, you might try to install the bcryptjs package (yarn add bcryptjs
) and replace:
const bcrypt = require("bcrypt");`
by:
const bcrypt = require("bcryptjs");
Hope it will work for you too!
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