import pkg from 'bcryptjs'; const { genSalt } = pkg; error code example Example: npm bcrypt npm install bcrypt