Next.js Discord

Discord Forum

Problem with Build, dev works without problems

Unanswered
Pine Bunting posted this in #help-forum
Open in Discord
Avatar
Pine BuntingOP
I have the following problem. I can't build my project but it starts without problem in dev mode
I hope someone can help me and tell me what I am doing wrong. I still have problems with NextJS 15

Code: https://hastebin.skyra.pw/tarepoxuke.ts
Error: https://hastebin.skyra.pw/ivexekikig.less

11 Replies

Avatar
it looks like you are using data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. So add either "use cache" or a Suspense boundary around it and the error is fixed
Avatar
Pine BuntingOP
Yes, I realize that. but I can't find where.
Avatar
it's somewhere inside your route /cp/servers/[id]. So I suggest you add a suspense boundary very high up (that wraps everything) and check if the error is gone
Avatar
@Pine Bunting solved?
Avatar
Pine BuntingOP
Unfortunately not. I gave up and am currently redoing the whole project. Maybe I'll find the error then 🙂 I'll let you know if it works then
Avatar
Pine BuntingOP
yes
Avatar
perfect, then the error is not in the tree itself. It's more inside your page.tsx (but before the return)
Avatar
Pine BuntingOP
i have commented out 95% of the file and the error still occurs
Avatar
do you have a layout?
Avatar
Pine BuntingOP
yes, but it doesn't make the error on other pages. But I'll take it out for a test