Heroku 'sh: 1: next: not found'

Viewed 3383

Please help, I am having this issue while deploying my nextjs app in Heroku, the app runs fine locally.

Below is the log from Heroku and my package.json file.

Log:

2021-08-13T07:26:20.752659+00:00 app[web.1]:
2021-08-13T07:26:20.752685+00:00 app[web.1]: > @ start /app
2021-08-13T07:26:20.752688+00:00 app[web.1]: > next start -p $PORT
2021-08-13T07:26:20.752689+00:00 app[web.1]:
2021-08-13T07:26:20.763505+00:00 app[web.1]: sh: 1: next: not found
2021-08-13T07:26:20.769117+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-08-13T07:26:20.769496+00:00 app[web.1]: npm ERR! syscall spawn
2021-08-13T07:26:20.769568+00:00 app[web.1]: npm ERR! file sh
2021-08-13T07:26:20.769636+00:00 app[web.1]: npm ERR! errno ENOENT
2021-08-13T07:26:20.772506+00:00 app[web.1]: npm ERR! @ start: `next start -p $PORT`
2021-08-13T07:26:20.772533+00:00 app[web.1]: npm ERR! spawn ENOENT

package.json:

{
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start -p $PORT"
  },
  "dependencies": {
    "@heroicons/react": "^1.0.3",
    "next": "latest",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "tailwind-scrollbar-hide": "^1.0.3"
  },
  "devDependencies": {
    "autoprefixer": "^10.2.6",
    "postcss": "^8.3.5",
    "tailwindcss": "^2.2.4"
  }
}
0 Answers
Related