NextJS 15 Deployment Linting errors

I am having challenges deploying my first Next JS project. There are linting issues, please help.
Here’s a summary of the linting and type errors you are facing with deployment in your Next.js 15 project:

  1. Type Error in Dynamic Route Page ([slug]/page.tsx)

-Error Message:

Type error: Type 'Props' does not satisfy the constraint 'PageProps'.
Types of property 'params' are incompatible.
Type '{ slug: string; }' is missing the following properties from type 'Promise<any>': then, catch, finally, [Symbol.toStringTag]
  • Cause:
    Next.js 15’s type system for dynamic routes is currently too strict and mismatches the actual runtime props. Even when using the canonical template from the documentation, the build fails with this type error.

  • Impact:

    • This error appears during the build process.
    • It does not affect the runtime or the actual deployment.
    • There is currently no clean workaround except to wait for a Next.js fix or downgrade to Next.js 14.
  1. Linting Error: Unused searchParams Parameter
  • Error Message:

    'searchParams' is defined but never used.  @typescript-eslint/no-unused-vars
    
  • Cause:
    Next.js expects the searchParams prop to be present for dynamic route pages, but if you don’t use it, ESLint complains about it being unused.

  • Workaround:

    • You can suppress this warning with // eslint-disable-next-line @typescript-eslint/no-unused-vars above the parameter.
    • This keeps the code clean and allows the build to proceed (except for the type error above).
  1. Suppression Comments Not Fully Effective
  • Issue:
    Attempts to suppress the type error with @ts-expect-error or @ts-ignore are flagged by the linter as “Unused ‘@ts-expect-error’ directive” because the error is only present during the Next.js build, not during regular TypeScript linting.

Summary Table

Error Type Message/Rule Impact on Deployment Workaround/Status
Type Error Type ‘Props’ does not satisfy ‘PageProps’ Build fails, site works Wait for Next.js fix or downgrade
Linting Error ‘searchParams’ is defined but never used Lint fails, site works Use eslint-disable-next-line
Suppression Error Unused ‘@ts-expect-error’ directive Lint fails, site works No clean workaround

Bottom Line

  • The only blocking error for deployment is the Next.js type error during build.
  • Your code is correct and matches the official docs.
  • The site will work at runtime, but the build will fail until Next.js fixes this type system bug.

If you need a temporary workaround for CI/CD or want to explore downgrading to Next.js 14, let me know!

I had this same issue… I built the project using v0, done several features and stuff before getting my own hands on vscode. And went by this same path and I will tell you what I did… yeah… I had to fix each one of these linting errors. In total was 134 files modified, several commits and stuff until their CI was happy.

So, yeah… good luck doing it. You will need.

Also, most likely you will encounter issues like imports, types and stuff… v0 will help you to build, not to do every single bit of stuff. Plus, remember about open keys, security, memory leak and stuff. Otherwise, you gonna have a really hard time, unfortunately =(

I have a little bit different problem with v15.5.2 , standalone, typedRoutes enabled on gitLab pipeline (locally it’s ok);

src/app/\[locale\]/(auth)/experts/page.tsx(18,14): error TS2304: Cannot find name 'PageProps'.

src/app/\[locale\]/(auth)/keywords/page.tsx(26,14): error TS2304: Cannot find name 'PageProps'.

src/app/\[locale\]/(auth)/links/new/page.tsx(18,14): error TS2304: Cannot find name 'PageProps'.

src/app/\[locale\]/(auth)/links/page.tsx(25,14): error TS2304: Cannot find name 'PageProps'.

src/app/\[locale\]/(auth)/organisations/page.tsx(20,14): error TS2304: Cannot find name 'PageProps'.

src/app/\[locale\]/(auth)/projects/page.tsx(14,14): error TS2304: Cannot find name 'PageProps'.

src/app/\[locale\]/(auth)/teams/page.tsx(20,14): error TS2304: Cannot find name 'PageProps'.