Skip to content

Add skipLibCheck to tsconfig.json to suppress node_modules type errors#1521

Merged
aliasaria merged 4 commits intomainfrom
fix/add-skipLibCheck-tsconfig
Mar 11, 2026
Merged

Add skipLibCheck to tsconfig.json to suppress node_modules type errors#1521
aliasaria merged 4 commits intomainfrom
fix/add-skipLibCheck-tsconfig

Conversation

@aliasaria
Copy link
Copy Markdown
Member

Problem

Running tsc --noEmit produces dozens of false-positive type errors from third-party .d.ts files in node_modules/ (e.g. playwright-core, webpack, remotion, @types/dom-webcodecs, file-selector). These libraries use newer TypeScript features (esnext symbols like asyncDispose) or have type conflicts that are incompatible with our current "lib": ["dom", "es2021"] target.

These are not bugs in our code — the build works fine because Webpack/Babel transpiles without full type-checking of dependencies.

Fix

Add "skipLibCheck": true to compilerOptions in tsconfig.json. This tells TypeScript to skip type-checking .d.ts files from node_modules, so tsc --noEmit now surfaces only real errors in our own source code.

This is the recommended setting for most projects and is enabled by default in create-react-app, Next.js, Vite, and other major scaffolding tools.

aliasaria and others added 3 commits March 11, 2026 13:26
Running `tsc --noEmit` produces dozens of false-positive errors from
third-party .d.ts files (playwright-core, webpack, remotion,
@types/dom-webcodecs, file-selector) whose type definitions are
incompatible with our lib target (es2021). These are not bugs in our
code — the build already works because Webpack/Babel bypasses full
type-checking of dependencies.

Setting skipLibCheck: true tells TypeScript to skip type-checking .d.ts
files in node_modules, so `tsc --noEmit` now surfaces only real errors
in our own source code.
@aliasaria aliasaria merged commit af451ea into main Mar 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants