During the production build process (next build), the TypeScript compiler consistently raises a type error in the file located at app/api/blog/[slug]/route.ts. The error message is as follows:
Type error: Route "app/api/blog/[slug]/route.ts" has an invalid "GET" export:
Type "{ params: { slug: string; }; }" is not a valid type for the function's second argument.
This error indicates a fundamental mismatch between the function signature of the exported GET handler and the type definition expected by the Next.js framework for dynamic API routes.