the-road-to-graphql / fullstack-apollo-express-postgresql-boilerplate

💥 A sophisticated GraphQL with Apollo, Express and PostgreSQL boilerplate project.
https://roadtoreact.com
MIT License
1.2k stars 265 forks source link

Cannot deploy to Heroku: Bcrypt 3.X.X #28

Open rwieruch opened 5 years ago

rwieruch commented 5 years ago

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:

{
  "name": "my-app",
  "version": "1.0.0",
  "description": "",
  "engines": {
    "node": "10.11.0"
  },
  ...
}
rwieruch commented 5 years ago

If anyone is running into this issue, just leave a quick comment here so that I know that this is still relevant.