Add skipLibCheck to tsconfig.json to suppress node_modules type errors#1521
Merged
Add skipLibCheck to tsconfig.json to suppress node_modules type errors#1521
Conversation
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.
deep1401
approved these changes
Mar 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Running
tsc --noEmitproduces dozens of false-positive type errors from third-party.d.tsfiles innode_modules/(e.g.playwright-core,webpack,remotion,@types/dom-webcodecs,file-selector). These libraries use newer TypeScript features (esnextsymbols likeasyncDispose) 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": truetocompilerOptionsintsconfig.json. This tells TypeScript to skip type-checking.d.tsfiles fromnode_modules, sotsc --noEmitnow 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.