
Photo by Ankush Minda on Unsplash
Ref: https://medium.com/@jacoboakley/deploy-a-next-js-app-on-heroku-69bcb01db1b7
Make sure you add this “start” script to your package.json.
"scripts": { "dev": "next", "build": "next build", "start": "next start -p $PORT", "heroku-postbuild": "npm run build", },
Without this “start” script, when Heroku spins up your site, it won’t correctly connect you next app to the port Heroko started.
Recent Comments