Hey all, here is my desperate week-long issue.
If I open my page app/products/category/[...complexSlug]/page.tsx
, containing this code
export default async function ProductCategoryPage({ params: { complexSlug } }) {
console.log('complexSlug', complexSlug)
const { type, currentPage } = await getData({ params: complexSlug })
if (!type) {
console.log('Products Category not found:', complexSlug)
return notFound()
}
I will see 404
if I click on the link to this page.
If I refresh this page the error is gone.
And if we look at the logs, the complexSlug seem to not being resolved on the server side, it remains a typeof complexSlug === 'string'
This is driving me crazy as is not reproducible locally with the dev server, nor with the build and start. It only happens on vercel. It came up after a large commit, so it’s hard to traceback.
But any ideas at all why would something like this happen?