next build isn't detecting generateStaticParams returning empty array in page.tsx #74201
Labels
bug
Issue was opened via the bug report template.
Developer Experience
Issues related to Next.js logs, Error overlay, etc.
Output (export/standalone)
Related to the the output option in `next.config.js`.
Runtime
Related to Node.js or Edge Runtime with Next.js.
TypeScript
Related to types with Next.js.
Webpack
Related to Webpack with Next.js.
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/intelligent-lichterman-wjpvwn
To Reproduce
Current vs. Expected behavior
According to the documentation, expected behavior is "To statically render all paths the first time they're visited, return an empty array (no paths will be rendered at build time)" and it should build and run
Current behavior: The build fails and isn't detecting the generateStaticParams solution.
Provide environment information
Which area(s) are affected? (Select all that apply)
Developer Experience, Output (export/standalone), Runtime, TypeScript, Webpack
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
If I made a generateStaticParams that didn't return an empty array, it seemed to work. However, that stops me from navigating to other, not-statically defined routes. I have a million different combinations these slugs can have, so I don't want to write them all and I want them to dynamically generate at runtime. The issue is that I need a static export for my AspNetCore middleware to properly serve the files. If anyone could help me, that would be great.
The text was updated successfully, but these errors were encountered: