Heroku app crashed because of eslint faulty import Heroku app crashed because of eslint faulty import express express

Heroku app crashed because of eslint faulty import


Found the answer thanks to Heroku support. The problem was that my dependencies were defined in the devDependencies of the package.json file, while they should be declared in dependencies for Heroku to properly work.


You seem to be referencing eslint-config-standard from within /app/server/.eslintrc.js, however your package.json doesn't have any dependencies.

You will want to run npm install eslint-config-standard --save which will create a dependency entry in your package.json. Then you should be save to commit the changes and deploy to heroku again.

Because you've not declared your dependency within the package.json, your dyno will not know to install it. I suspect you've simply forgotten to add the --save flag onto your original npm install and so it's only installed into your node_modules folder without making the entry in the package.json.