dcodeIO / bcrypt.js

Optimized bcrypt in plain JavaScript with zero dependencies.
Other
3.47k stars 264 forks source link

hashSync is not a function #114

Closed ginamdar closed 4 years ago

ginamdar commented 4 years ago

Where is this function? Am I doing something wrong here? TypeError: bcrypt.hashSync is not a function at Object.bcrypt.compareSync (~/Projects/auth/server/node_modules/bcryptjs/dist/bcrypt.js:268:41)

this is how i am calling

bcrypt.hash(password, bcrypt.genSaltSync(10), (err, hashed) => {
        return bcrypt.compareSync(hashed, this.password);
    });
ginamdar commented 4 years ago

some how the function is there at line # 177 ..reinstalled the package and its now working.! Closing the issue