NextJS deployment failed Please Help

Hello, I am trying to deploy my NextJS project but I get this error:
Sep 6 04:39:38 PM ==> Starting service with ‘npm start’
Sep 6 04:39:41 PM npm ERR! code ENOENT
Sep 6 04:39:41 PM npm ERR! syscall open
Sep 6 04:39:41 PM npm ERR! path /opt/render/project/src/package.json
Sep 6 04:39:41 PM npm ERR! errno -2
Sep 6 04:39:41 PM npm ERR! enoent ENOENT: no such file or directory, open ‘/opt/render/project/src/package.json’
Sep 6 04:39:41 PM npm ERR! enoent This is related to npm not being able to find a file.
Sep 6 04:39:41 PM npm ERR! enoent
Sep 6 04:39:41 PM
Sep 6 04:39:41 PM npm ERR! A complete log of this run can be found in:
Sep 6 04:39:41 PM npm ERR! /opt/render/.cache/_logs/2022-09-06T21_39_41_928Z-debug.log

Hi,

When calling npm start, we will look for your package.json in the root of your project, and it looks like from the logs that we’re not finding it. If your package.json is in another directory, you can cd directory && npm start. We also have monorepo support in early access, which can be used to specify a root directory to run your commands in https://render.com/docs/monorepo-support

Thank you for the reply. I will try the monorepo support.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.