-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TS5056 when using JSON and TS files with the same basename in composite project #34943
Comments
This is introduced in #32372 |
This hit me under |
This issue is only about the json case, as previously is worked since json files had no output - for other files whose outputs conflict, the error is expected. You should probably just use a different name for one of the inputs. |
@weswigham I can change my code, but it's more difficult to change libraries I depend on. For example, https://loopback.io/ version 3 requires the model specification file named |
Moreso talking to @StoneCypher - his issue seems a bit different, and the same error is used in situations not involving json files. |
@weswigham - ya, I mean, I kind of get that it's my fault, and sort of a dumbassed thing to have done What was going on was I was trying to make a video that showed how to do rollup / typescript / react from scratch with no generators or whatever, and to underscore how easy it actually is And so I copy pastaed the rollup config, and since I did somehow less than zero planning on the video, I just sort of munged the filenames and whatnot on the fly And so I just called them both index, because here's my middle finger regarding thinking, at all, especially while making a video, but also sort of in general. And once I eventually just renamed the bundle output to bundle, everything switched back to common sense mode And you're right, my problem is clearly different than theirs My goals in commenting here are four-fold
|
also for the record i adore typescript and you folks have saved me enormous pain |
amusingly because i was trying to make a youtube tutorial, i actually have a video of myself hitting the bug, and getting pissed off while i try to figure out what's happening it's kinda fun to watch |
This is no longer a problem in 3.7.5 9ba45fc . Thanks! |
TypeScript Version: 3.7.2
Search Terms: TS5056 composite JSON
Code
Minimal reproduction repo https://github.com/thovden/ts37-ts5056-composite
Compilation fails with a
TS5056
when the basename of a Typescript and JSON file is the same in a composite project when usingresolveJsonModule
Expected behavior:
Compiles fine in a composite project.
Actual behavior:
error TS5056: Cannot write file '.../ts37-ts5056-composite/dist/test.d.ts' because it would be overwritten by multiple input files.
Playground Link:
Related Issues:
@sheetalkamat has been working on related issues - e.g., #34676 , #33827
The text was updated successfully, but these errors were encountered: