Next 13 Net New Project Build Fails

I have a net new Next 13+ project GitHub - jerw-git/bge

I am running npm install; npm run build then npm run start as per instructions but it always fails with a very large error.

May 24 10:27:30 AM  ==> Cloning from https://github.com/jerw-git/bge...
May 24 10:27:31 AM  ==> Checking out commit ec681b557acba6cbeb2d66abe7d22f749259c3a2 in branch main
May 24 10:27:35 AM  ==> Running build command 'npm install; npm run build'...
May 24 10:28:02 AM  added 354 packages from 273 contributors and audited 362 packages in 27.079s
May 24 10:28:02 AM  
May 24 10:28:02 AM  136 packages are looking for funding
May 24 10:28:02 AM    run `npm fund` for details
May 24 10:28:02 AM  
May 24 10:28:02 AM  found 0 vulnerabilities
May 24 10:28:02 AM  
May 24 10:28:03 AM  
May 24 10:28:03 AM  > bge@0.1.0 build /opt/render/project/src
May 24 10:28:03 AM  > next build
May 24 10:28:03 AM  
May 24 10:28:03 AM  uncaughtException /opt/render/project/src/node_modules/next/dist/compiled/undici/index.js:1

May 24 10:28:03 AM  npm ERR! errno 1
May 24 10:28:03 AM  npm ERR! bge@0.1.0 build: `next build`
May 24 10:28:03 AM  npm ERR! Exit status 1
May 24 10:28:03 AM  npm ERR!
May 24 10:28:03 AM  npm ERR! Failed at the bge@0.1.0 build script.
May 24 10:28:03 AM  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
May 24 10:28:03 AM  
May 24 10:28:03 AM  npm ERR! A complete log of this run can be found in:
May 24 10:28:03 AM  npm ERR!     /opt/render/.cache/_logs/2023-05-24T14_28_03_307Z-debug.log
May 24 10:28:03 AM  ==> Build failed 😞

Any help?

I deployed a Next 13 using yarn

yarn; yarn build
yarn start

hope it helps!

1 Like

I’m not using yarn though so it gives package lock error

That’s strange, I am not using yarn either. I just followed the official docs on deploying Next apps.

Hi James,

Are you using the same version of node on Render that you are using locally? I think this related community post might be helpful, as it looks like the same error is referenced.

If that doesn’t help, just let us know.

Regards,
Mike

I switched to yarn and it says next not found

Hi James,

Have you verified the version of Node you are running locally matches what is running on Render? That’s always a good first step. Also, here’s a link to a discussion that seems related to this issue that may offer some potential solutions.

Beyond all that, I recommend reaching out to us privately via the Render Dashboard so we can have a more detailed discussion.

Regards,
Mike

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