Mastodon hachyterm.io

Heroku doesn’t deploy your dev dependencies. This sounds like a good thing. But when you develop Node.js with Nodemon and your package.json uses nodemon as a start script, things can go haywire with Heroku.

Easy fix: change your entry in package.json back from nodemon to node.

...
"scripts": {
    "start": "node server.js" // instead of: "nodemon server.js"
  },
...

Also, check your other dependencies. Sometimes you might switch other packages from dev to normal dependencies, too.

For example, I used knex.js for PostgreSQL interop and installed it as a dev dependency first. That didn’t work with Heroku.

Further Reading