Can't build prod version: Error occurred prerendering page "/jobs".
Describe the bug
Get error when trying to run make run-prod
To Reproduce Steps to reproduce the behavior:
- Install all dependencies and run
setup.sh - run
make run-prod - See error
% make run-prod
📦 Building for production…
> [email protected] build
> npm run build:frontend && npm run build:backend
> [email protected] build:frontend
> cd apps/frontend && npm run build
> [email protected] build
> next build
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry
▲ Next.js 15.3.0
- Environments: .env
Creating an optimized production build ...
✓ Compiled successfully in 5.0s
Linting and checking validity of types ... ⨯ ESLint: Key "rules": Key "prettier/prettier": Could not find "prettier" in plugin "prettier".
✓ Linting and checking validity of types
✓ Collecting page data
⨯ useSearchParams() should be wrapped in a suspense boundary at page "/jobs". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
at a (/Users/misha/dev/Resume-Matcher/apps/frontend/.next/server/chunks/758.js:5:41956)
at f (/Users/misha/dev/Resume-Matcher/apps/frontend/.next/server/chunks/758.js:3:19663)
at p (/Users/misha/dev/Resume-Matcher/apps/frontend/.next/server/app/(default)/(onboarding)/jobs/page.js:1:3611)
at nF (/Users/misha/dev/Resume-Matcher/apps/frontend/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:46843)
at nH (/Users/misha/dev/Resume-Matcher/apps/frontend/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:48618)
at nH (/Users/misha/dev/Resume-Matcher/apps/frontend/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:64688)
at nW (/Users/misha/dev/Resume-Matcher/apps/frontend/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:67762)
at nz (/Users/misha/dev/Resume-Matcher/apps/frontend/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:65337)
at nY (/Users/misha/dev/Resume-Matcher/apps/frontend/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:71193)
at nX (/Users/misha/dev/Resume-Matcher/apps/frontend/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:69876)
Error occurred prerendering page "/jobs". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /(default)/(onboarding)/jobs/page: /jobs, exiting the build.
⨯ Next.js build worker exited with code: 1 and signal: null
make: *** [run-prod] Error 1
Desktop (please complete the following information)
- OS: MacOS 15.3.2
Same issue for me! Same error when running make run-prod
Desktop (please complete the following information)
- OS: MacOS 15.5
Thanks for the heads up. Yes we are aware of this issue and trying to fix it in the coming weeks.
the same issue on Ubuntu 24.04
I am having the same issue @srbhr. Do we have a way to access a previous version or do you have a timeline on fixing this?
Same error, fedora 42
On the ProvideJobDescriptionsPage, add a Suspense on the the JobDescriptionUploadTextArea, like this: import React, { Suspense } from 'react';
<Suspense fallback={<div className="text-white">Loading...</div>}>
<JobDescriptionUploadTextArea />
</Suspense>
This will resolve the error and allow the hook to work as intended.