Tried all the community solutions on this first and nothing is working. My app is working locally without any issues on port 4000.
The procfile has
web: node app.js
for heroku to run
The packages.json has:
"scripts": {
"preinstall": "npm install pm2 -g",
"start": "node ./node_modules/.bin/pm2-runtime app.js -i max"
},
Also installed PM2 globally on local system.
Any help? I'd 5 hours of "Application Error" after deployment.