2 months ago
Hello, I am facing a problem while deploying my Next.js project on Railway. The error says TypeError: Invalid URL during the build process. It works locally, but fails during Railway deployment. But when I publish it on Vercel, there is no problem.
The error I get during build: Generating static pages (0/19) ...
Error occurred prerendering page "/reset". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Invalid URL
at new URL (node:internal/url:806:29)
at new aS (/app/.next/server/chunks/873.js:6:68899)
at aT (/app/.next/server/chunks/873.js:6:72575)
at aU (/app/. next/server/chunks/873.js:10:4468)
at a (/app/.next/server/app/(auth)/reset/page.js:1:11582)
at h (/app/.next/server/app/(auth)/reset/page. js:1:5126)
at nO (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:45959)
at nI (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod. js:20:47734)
at nL (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:65533)
at nN (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:63164)
Export encountered an error on /(auth)/reset/page: /reset, exiting the build.Generating static pages (0/19) ...
Error occurred prerendering page "/reset". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Invalid URL
at new URL (node:internal/url:806:29)
at new aS (/app/.next/server/chunks/873.js:6:68899)
at aT (/app/.next/server/chunks/873.js:6:72575)
at aU (/app/. next/server/chunks/873.js:10:4468)
at a (/app/.next/server/app/(auth)/reset/page.js:1:11582)
at h (/app/.next/server/app/(auth)/reset/page. js:1:5126)
at nO (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:45959)
at nI (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod. js:20:47734)
at nL (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:65533)
at nN (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:63164)
Export encountered an error on /(auth)/reset/page: /reset, exiting the build.
0 Replies