It is due to how Next.js handles Typescript and its build process. In Next.js, there are a few reasons:
1.Server-Side Rendering: this sometimes lead to type errors not being immediately visible in the browser since the code may execute without being fully type-checked in the same way as in a client-rendered React app. 2.Type Checking Behavior: If you're running the development server with next dev, TypeScript errors might not break the development server but will show up in the terminal where the Next.js process is running. 3.Typescript Configuration: Just ensure that in tsconfig.json the strict option is enabled, which will enforce stricter type checks throughout your application. 4.Next.js Type Checking: enable type checking using the next dev command by adding the --type-check flag, however this may not be the default behavior..
The way to enable type errors in Next.js