kelektiv / node.bcrypt.js

bcrypt for NodeJs
MIT License
7.47k stars 516 forks source link

lazy symbol binding failed: Symbol not found: ____chkstk_darwin #973

Closed DoneDeal0 closed 1 year ago

DoneDeal0 commented 1 year ago

Hello,

My node server crashes when using the hashSync method. My code is:

import bcrypt from "bcrypt";

export class AuthControler {

  static createUser(user: User) {
    return UserDB.create({
      email: user.email,
      membershipValidUntil: "",
      password: bcrypt.hashSync(user.password, 10),
      passwordResetToken: {
        token: undefined,
        validuntil: undefined,
      },
    });
  }

}

The error is:

dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: /Users/donedeal/Desktop/myapp/back/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
  Referenced from: /Users/donedeal/Desktop/myapp/back/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libSystem.B.dylib

My node version is: 16.13.1 My bcrypt version is: 5.1.0

There is obviously an issue with my code, but I don't see where.