You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was tracking down another issue with Vercel support (requesting a certain page with RSC header returned an error 500). After updating my reproduction to Next canary it no longer wanted to build at all:
[== ] info - Generating static pages (4/13)SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse (<anonymous>)
Support engineer asked me to create an issue for it.
Expected Behavior
No error.
Which browser are you using? (if relevant)
Not relevant
How are you deploying your application? (if relevant)
Vercel
The text was updated successfully, but these errors were encountered:
rijk
added
the
bug
Issue was opened via the bug report template.
label
Feb 2, 2023
All right, I've discovered this is caused by a conditional return in several head components. Adding return null to the end fixed the build issue.
As an aside (and why I'll leave this open although the original issue is fixed), while debugging I found that if a page does not have a generateStaticParams() (or returns [] from it), it is called with params like this:
Hi, this is currently expected yes as we currently attempt prerendering the page with default params to test if it is static or not similar to the generation of fallback pages. We are investigating this behavior still though.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue
https://github.com/rijk/repro-rsc-issue/tree/repro
To Reproduce
Run
pnpm run build
Describe the Bug
I was tracking down another issue with Vercel support (requesting a certain page with RSC header returned an error 500). After updating my reproduction to Next canary it no longer wanted to build at all:
Support engineer asked me to create an issue for it.
Expected Behavior
No error.
Which browser are you using? (if relevant)
Not relevant
How are you deploying your application? (if relevant)
Vercel
The text was updated successfully, but these errors were encountered: