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
This is the behavior in every version (5.8.3 and 5.9.0-dev.20250330) I tried, and I reviewed the FAQ for entries about "because it would overwrite input file"
a error message that is not very helpful at b/tsconfig.json.
Cannot write file 'reproduce/ts-accidental-circular-reference/b/dist/index.d.ts' because it would overwrite input file.ts
🙂 Expected behavior
Despite the error message, tsc should give some helpful information so developers can figure out there is a circular project reference between a and b. Without this kind of information, circular reference is extremely hard to find out in a big monorepo
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered:
I can't repro that behavior either. This is what I get when trying to infer what you were doing:
Before running pnpm install
D:\Throwaway\reproduce\ts-accidental-circular-reference>tsc -b
a/src/index.ts:1:19 - error TS2307: Cannot find module 'b' or its corresponding type declarations.
1 import { y } from 'b'
~~~
b/src/index.ts:1:19 - error TS2307: Cannot find module 'a' or its corresponding type declarations.
1 import { x } from 'a'
~~~
Found 2 errors.
D:\Throwaway\reproduce\ts-accidental-circular-reference>cd a
D:\Throwaway\reproduce\ts-accidental-circular-reference\a>tsc
src/index.ts:1:19 - error TS2307: Cannot find module 'b' or its corresponding type declarations.
1 import { y } from 'b'
~~~
Found 1 error in src/index.ts:1
D:\Throwaway\reproduce\ts-accidental-circular-reference\a>cd ..\b
D:\Throwaway\reproduce\ts-accidental-circular-reference\b>tsc
src/index.ts:1:19 - error TS2307: Cannot find module 'a' or its corresponding type declarations.
1 import { x } from 'a'
~~~
Found 1 error in src/index.ts:1
🔎 Search Terms
because it would overwrite input file
🕗 Version & Regression Information
⏯ Playground Link
https://github.com/Jack-Works/reproduce/tree/main/ts-accidental-circular-reference
💻 Code
🙁 Actual behavior
a error message that is not very helpful at
b/tsconfig.json
.🙂 Expected behavior
Despite the error message, tsc should give some helpful information so developers can figure out there is a circular project reference between a and b. Without this kind of information, circular reference is extremely hard to find out in a big monorepo
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: