Next.js Discord

Discord Forum

How do I get nextJS to shut the fuck up and build?

Unanswered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
I have a page that handles wildcard paths called [...slug], and nextJS is like "Error: Page "/[...slug]" is missing "generateStaticParams()" so it cannot be used with "output: export" config.". I remove output: "export" in next.config.mjs, and nextJS is like "Cannot find module 'next/dist/lib/metadata/types/metadata-interface.js' or its corresponding type declarations". What the fuck? Why is nextJS such a pile of trash?

2 Replies

Why not just add the generateStaticParams function?
To make a dynamic route, it does need params generation method