# Linting and checking validity of types ..Failed to compile

**URL:** <https://forum.builder.io/t/linting-and-checking-validity-of-types-failed-to-compile/12813>\
**Category:** Technical Questions\
**Tags:** react, nextjs\
**Created:** [February 20, 2025, 2:10pm UTC](https://forum.builder.io/t/linting-and-checking-validity-of-types-failed-to-compile/12813 "2025-02-20T14:10:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dois12](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@dois12](https://forum.builder.io/u/dois12)\
**Post date:** [February 20, 2025, 2:10pm UTC](https://forum.builder.io/t/linting-and-checking-validity-of-types-failed-to-compile/12813/1 "2025-02-20T14:10:34Z")

</div>

I am trying to compile the app using npm run build  
I get error:  
▲ Next.js 15.1.7

- Environments: .env

Creating an optimized production build …  
✓ Compiled successfully  
Linting and checking validity of types …Failed to compile.

.next/types/app/[…page]/page.ts:34:29  
Type error: Type ‘PageProps’ does not satisfy the constraint ‘import(“C:/Users/Admin/builder-app/.next/types/app/[…page]/page”).PageProps’.  
Types of property ‘params’ are incompatible.  
Type ‘{ page: string; }’ is missing the following properties from type ‘Promise’: then, catch, finally, [Symbol.toStringTag]

32 |  
33 | // Check the prop type of the entry function

> 34 | checkFields\<Diff\<PageProps, FirstArg\<TEntry[‘default’]\>, ‘default’\>\>()  
> | ^  
> 35 |  
> 36 | // Check the arguments and return type of the generateMetadata function  
> 37 | if (‘generateMetadata’ in entry) {  
> Next.js build worker exited with code: 1 and signal: null

how to fix this

---

<div class="post-metadata">

**Author:** ![tlee-pb](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@tlee-pb](https://forum.builder.io/u/tlee-pb)\
**Post date:** [April 25, 2025, 7:09pm UTC](https://forum.builder.io/t/linting-and-checking-validity-of-types-failed-to-compile/12813/2 "2025-04-25T19:09:54Z")

</div>

This error is happening because the `params` field in your `PageProps` type is expected to be a `Promise`, but you have it as a plain object (`{ page: string }`).

Specifically, this part of the error:

```auto
Type ‘{ page: string; }’ is missing the following properties from type ‘Promise’

```

### Likely cause:

You’re probably using `generateStaticParams`, dynamic routing (e.g., `[...page]`), or `params` in your layout/page file, and the type definition is not matching the expected structure that Next.js generated during build.

* * *

### ✅ Solution:

1. **Inspect your `PageProps` type** and compare it to what Next.js expects.

If you have something like:

```auto
type PageProps = {
  params: { page: string }
}

```

Try updating it to match the expected type (which is **probably** asynchronous):

```auto
type PageProps = {
  params: Promise<{ page: string }>
}

```

But this is unusual — usually `params` is _not_ a Promise, so the real problem might be the _other way around_: **your component is treating `params` as a Promise** , when it should be just an object.

So if you see code like:

```auto
const Page = async ({ params }: PageProps) => {
  const { page } = await params;

```

You should change it to:

```auto
const Page = async ({ params }: PageProps) => {
  const { page } = params;

```

* * *

### 🔍 To confirm:

Search for `params` in your `[...page]/page.tsx` file and see if you’re doing `await params` or treating it like a Promise. That’s the likely mismatch.
