If anyone runs into this problem as I did today with Bcrypt while deploying to Heroku, this may help you.
Locally I am using Node version 10.11.0, but because I haven't specified anything else in the package.json file, Heroku took a default Node version 8.XX.XX for its own build. When using Bcrypt 3.0.2 and Node 8.XX.XX it didn't work. Then I set it explicitly the Node version for Heroku in the package.json file. It worked:
If anyone runs into this problem as I did today with Bcrypt while deploying to Heroku, this may help you.
Locally I am using Node version 10.11.0, but because I haven't specified anything else in the package.json file, Heroku took a default Node version 8.XX.XX for its own build. When using Bcrypt 3.0.2 and Node 8.XX.XX it didn't work. Then I set it explicitly the Node version for Heroku in the package.json file. It worked: