You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
API server panics in acquireConfigForFile when opening a JS file a tsconfig does not include #65054
The JS file opens in the inferred project (/dev/null/inferred), as it does when there is no tsconfig, and as 7.0.2 (typescript/unstable/sync, updateSnapshot) did with this exact layout.
Additional information about the issue
The same thing happens with .js, and with the JS file one or two directories below the tsconfig.
With no tsconfig, the file opens in /dev/null/inferred as expected.
If a .ts file the tsconfig includes sits in the same directory as the JS file, it also opens fine.
We hit this in a repository validator that opens every source file in a checkout, including stray .mjs and .cjs build scripts that no tsconfig includes.
Same panic (acquireConfigForFile → SyncMapEntry.ChangeIf) with .ts files too. It seems to trigger whenever the nearest tsconfig.json matches no files of its own and doesn't include the opened file, regardless of extension:
nearest tsconfig.json
opened file
7.0.2
7.1.0-beta / 7.1.0-dev.20261030.1
{"files":[],"references":[{"path":"./a"}]}
x.ts (also scripts/x.ts)
inferred
panic
{"files":[]}
x.ts
inferred
panic
{"include":["src"]}, src/ empty
x.ts
inferred
panic
{"include":["src"]}, src/a.ts exists
x.ts
inferred
inferred
{"files":["a.ts"],"references":[{"path":"./a"}]}
x.ts
inferred
inferred
The first row is a common layout: a solution-style root tsconfig with a stray root file such as vitest.config.ts.
For comparison, the LSP server (tsc --lsp --stdio) handles didOpen and hover for all of these layouts without crashing. Only the API's createSnapshot({ openFiles }) panics.
Activity
Skip every file TypeScript 7.1.0-beta crashes on, not just solution-s…
ycmjason commentedon Oct 30, 2026
Same panic (
acquireConfigForFile→SyncMapEntry.ChangeIf) with.tsfiles too. It seems to trigger whenever the nearesttsconfig.jsonmatches no files of its own and doesn't include the opened file, regardless of extension:tsconfig.json{"files":[],"references":[{"path":"./a"}]}x.ts(alsoscripts/x.ts){"files":[]}x.ts{"include":["src"]},src/emptyx.ts{"include":["src"]},src/a.tsexistsx.ts{"files":["a.ts"],"references":[{"path":"./a"}]}x.tsThe first row is a common layout: a solution-style root tsconfig with a stray root file such as
vitest.config.ts.For comparison, the LSP server (
tsc --lsp --stdio) handlesdidOpenandhoverfor all of these layouts without crashing. Only the API'screateSnapshot({ openFiles })panics.Drop the TypeScript 7.1.0-beta crash workaround; wait for the upstrea…