Skip to content

nextjs/tsc

Has Next.js write its types, then type-checks the app with the strict compiler options.

Part of the nextjs configuration, at the recommended level. It runs at the push stage, once per scope. It runs next.

A fresh clone holds no next-env.d.ts and no route types, so a plain tsc run fails on imports the framework resolves.

Fix the first error tsc prints; later errors often come from the same mistake.

const count: number = "one"; reports an incompatible assignment. Assign a number, such as const count: number = 1;.

Turn it off for some files, with a reason:

gspot ignore nextjs/tsc --paths "<glob>" --reason "<why>"