Next.js Discord

Discord Forum

Error occurred prerendering page "/auth".

Unanswered
Brown Noddy posted this in #help-forum
Open in Discord
Brown NoddyOP
am getting this error while deploying the project, build while am building the project locally am not getting any error.

www:build:     at nX (/vercel/path0/apps/www/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:69876)
www:build:     at nW (/vercel/path0/apps/www/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:68029)
www:build:     at nz (/vercel/path0/apps/www/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:65337)
www:build: Export encountered an error on /(public)/auth/page: /auth, exiting the build.
www:build:  ⨯ Next.js build worker exited with code: 1 and signal: null
www:build: error: script "build" exited with code 1
www:build: ERROR: command finished with error: command (/vercel/path0/apps/www) /bun1/bun run build exited (1)
www#build: command (/vercel/path0/apps/www) /bun1/bun run build exited (1)
  Tasks:    3 successful, 4 total
 Cached:    2 cached, 4 total
   Time:    54.758s 
Summary:    /vercel/path0/.turbo/runs/2zbCCP5vwTsGZbY64K5VqhIj1Gx.json
 Failed:    www#build
 ERROR  run failed: command  exited (1)
Error: Command "turbo run build" exited with 1

2 Replies

Brown NoddyOP
@linesofcode hey can you help me with this?
Kangal Shepherd Dog
Hi, I am sorry for your error, I am full stack developer. I have experience as error. I think Vercel sees a problem with your /auth/page.tsx likely due to a bad folder name like (public), a missing environment variable, using server only code in the wrong place or file and route confilct. I recommend next fix method. rename (public) for avoid using special folder names. make sure all required env variables are set in Vercel. don't use server code in client components. run (vercel build) locally to test. I am looking forward to your success