I'm been a bit remiss and only tested a few small changes using my dev script:
"dev": "cross-env NODE_OPTIONS=--no-deprecation next dev --no-server-fast-refresh",
and now if I run my build script:
"build": "next build",
"postbuild": "next-sitemap --config next-sitemap.config.cjs",
I get the error below. I thought it was a missing env var so I've replaced all uses of that with a hard-coded value in all my collections and globals:
admin: {
hideAPIURL: true*,
},
Any tips on how to narrow down the error will be appreciated.
next build
▲ Next.js 16.2.1 (Turbopack)
Environments: .env.local, .env
Creating an optimized production build ...
✓ Compiled successfully in 9.1min
✓ Finished TypeScript in 61s
Collecting page data using 7 workers ...Error: A required parameter (slug) was not provided as a string received object in generateStaticParams for /[slug]
at ignore-listed framesBuild error occurred
Error: Failed to collect page data for /[slug]
at ignore-listed frames {
type: 'Error'
}
ELIFECYCLE Command failed with exit code 1.