Jul*_*oux 6 login bcrypt node.js express
当我尝试使用bcrypt.compare登录用户来比较密码时,此错误消息显示在我的终端中.
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
Run Code Online (Sandbox Code Playgroud)
我正在使用node.js和express.
我就是这样解决的。如果您遇到这种情况,您可以尝试安装 bcryptjs 包 ( yarn add bcryptjs) 并替换:
const bcrypt = require("bcrypt");`
Run Code Online (Sandbox Code Playgroud)
经过:
const bcrypt = require("bcryptjs");
Run Code Online (Sandbox Code Playgroud)
希望它也对你有用!
| 归档时间: |
|
| 查看次数: |
1015 次 |
| 最近记录: |