Repository navigation
fix(tsconfig): give the node project inputs it can actually have - #1771
Merged
musistudio merged 1 commit intoSep 16, 2026
Merged
Conversation
`tsc -b` fails before it builds anything: error TS18003: No inputs were found in config file 'tsconfig.node.json'. Specified 'include' paths were '["build/**/*.mjs"]' and 'exclude' paths were '[]'. Editors report the same error against the file directly, which is where it is usually met. The include names ten files that exist, but TypeScript only takes `.mjs` as an input when `allowJs` is on, and it is not. So the referenced project has no inputs and cannot have any, which a composite project may not. `allowJs` is not the fix. Turning it on with `checkJs` surfaces 20 errors in build scripts nobody asked TypeScript to check, and turning it on without `checkJs` only produces declarations for build tooling. Either is a policy change, not a repair. `build/` has never held a `.ts` file. What the root config does not cover is `playwright.config.ts` -- its include is `packages/*/src/**` and `tests/e2e/**` -- and a node-side config file is what a `tsconfig.node.json` exists for. Pointing the include there gives the project real inputs and type-checks a file that was unchecked. Composite implies declaration emit, so the output goes to `.tmp/`, which is already ignored, instead of dropping `playwright.config.js` and a `.d.ts` next to the source. `npm run typecheck` is unaffected: it runs `tsc --noEmit`, which never built this reference, which is why the repo has been green with it broken.
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.
tsc -bfails before it builds anything, and editors report the same error against the file directly — which is where it is usually met:Why
The include names ten files that do exist (
build/build.mjs,build/dev.mjs, …). But TypeScript accepts.mjsas an input only whenallowJsis on, and it is not. So the referenced project has no inputs and cannot have any — which acompositeproject may not.allowJsis not the fix. WithcheckJsit surfaces 20 errors in build scripts nobody asked TypeScript to check:Without
checkJsit only emits declarations for build tooling. Either is a policy change for you to make, not a repair.build/has never held a.tsfile (git log --diff-filter=AD -- 'build/*.ts'is empty), so the include has been aspirational since the file arrived.The change
The root config's include is
packages/*/src/**andtests/e2e/**. That leavesplaywright.config.tsunchecked by anything — and a node-side config file is exactly what atsconfig.node.jsonis for in this layout. Pointing the include there gives the project real inputs and picks up a file that had none.compositeimplies declaration emit and forbidsnoEmit(TS6310), so the output is directed at.tmp/, which.gitignorealready covers. Without that,tsc -bdropsplaywright.config.jsandplaywright.config.d.tsnext to the source.Verification
tsc -bTS18003npm run typecheck.tmp/)npm run typecheckwas green throughout: it runstsc --noEmit, which never builds project references. That is why this has sat broken without failing CI.One thing I did not change:
tsc -balso writestsconfig.tsbuildinfoat the root, and I checked that it does so onmaintoo — it is the root project's own artifact, not a consequence of this fix.