Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
After upgrading to the latest Next.js canary version, I get an error:
src/app/(payload)/api/[...slug]/route.ts
Type error: Route "src/app/(payload)/api/[...slug]/route.ts" has an invalid "GET" export:
Type "{ params: { slug: string[]; }; }" is not a valid type for the function's second argument.
Link to reproduction
No response
Environment Info
Describe the Bug
After upgrading to the latest Next.js canary version, I get an error:
As mentioned in this Next.js PR:
I fixed the same error when it comes to my Next.js code, but as advised, the Payload files are generated automatically and I should not modify them.
Reproduction Steps
Adapters and Plugins
No response