failed to build #80404
Replies: 3 comments 1 reply
-
The link you provided is not working for me. Is In Server Components, you should fetch the data from source, no need to add an additional HTTP request, that, as you can see, fails at build time. |
Beta Was this translation helpful? Give feedback.
-
you are right after some exploring, i know it is the problem of static render, there are so many discussions about it. have to say app router hard to use. |
Beta Was this translation helpful? Give feedback.
-
Not necessarily difficult. You just have to get the idea that Next.js tries to statically render as much as possible, and you can opt-out from that through certain mechanisms. In this case, you are not using any, so-called, dynamic APIs, like params, searchParams, etc, so with the information available, Next.js tries to pre-render. You can force certain behavior, through BUT! That's still not correct in my opinion. When a request arrives to You should just do the work you do in As of today, in the stable releases, Next.js decides "what to statically render" at page level, but soon, this will be possible at Component level, sort of. https://nextjs.org/docs/app/getting-started/partial-prerendering Last but not least:
This was a problem in Pages Router too :) https://nextjs-faq.com/fetch-api-in-getserversideprops |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/nervous-mendel-7p5mxw?workspaceId=ws_CW1CqER1U5pNNAXk19HUDh
To Reproduce
npm run build
why could
failed to fetch
makebuild
failed? it makes no sense.Current vs. Expected behavior
can't build and expect to build
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-11 (2025-05-22T09:39Z) Available memory (MB): 47945 Available CPU cores: 12 Binaries: Node: 20.13.1 npm: 10.5.2 Yarn: N/A pnpm: 9.3.0 Relevant Packages: next: 15.3.3 // Latest available version is detected (15.3.3). eslint-config-next: 15.3.3 react: 19.1.0 react-dom: 19.1.0 typescript: 5.8.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions