Files
next.js/errors
81643544fc Throw when generateStaticParams returns invalid values (#95968)
> [!TIP]
> This PR is best reviewed commit by commit.

### Why?

`generateStaticParams` must return an array of objects, but Next.js does
not currently provide a clear error when it returns something else.

### How?

- Throw when `generateStaticParams` does not return an array.
- Throw when an item in the returned array is not an object.
- Keep allowing `{}`. The follow-up rejects it with `output: 'export'`
when it leaves a dynamic route parameter missing.

Follow-up: #95969

Supersedes #95388.

<!-- NEXT_JS_LLM -->

Co-authored-by: SukkaW <[email protected]>

---------

Co-authored-by: Joseph <[email protected]>
2026-07-23 23:25:55 +02:00
..
2025-05-08 13:11:38 +01:00
2025-05-12 08:32:57 -05:00
2025-05-12 08:32:57 -05:00