Next build failed on vercel, not locally

Hi,

I try to develop a next project on vercel.

On my side, it build perfectly.

On vercel, I got this :

Error occurred prerendering page "/_not-found". Read more: https://nextjs.org/docs/messages/prerender-error

12:51:03.388

TypeError: Invalid URL

12:51:03.388

at new URL (node:internal/url:818:25)

12:51:03.388

at new tb (/vercel/path0/.next/server/chunks/266.js:6:68891)

12:51:03.388

at tS (/vercel/path0/.next/server/chunks/266.js:6:72567)

12:51:03.389

at 461 (/vercel/path0/.next/server/app/_not-found/page.js:5:2687)

12:51:03.389

at t (/vercel/path0/.next/server/webpack-runtime.js:1:128)

12:51:03.389

at 3775 (/vercel/path0/.next/server/app/_not-found/page.js:1:3253)

12:51:03.389

at Object.t [as require] (/vercel/path0/.next/server/webpack-runtime.js:1:128)

12:51:03.389

at require (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:131:7946)

12:51:03.389

at u (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:36:646)

12:51:03.389

at F (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:36:10477)

12:51:03.390

Export encountered an error on /_not-found/page: /_not-found, exiting the build.

12:51:03.392

⨯ Static worker exited with code: 1 and signal: null

12:51:03.428

Error: Command "npm run build" exited with 1

I really don’t understand why it’s different, and how I can fix it

Thanks !

Hi, Comey! Welcome to the Vercel Community :wave:

It looks like this is a prerender error, did you review the following docs?

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