forceConsistentCasingInFileNames error message doesn't contain enough information
See original GitHub issueTypeScript Version:
1.9.0-dev.20160301
Code
a.ts
import B from './b';
console.log(B);
B.ts (note the casing here)
export default function B() {
}
Expected behavior: a.ts is never referred in the the error so it is impossible to know which file and line number is actually trying to import it.
Actual behavior:
tsc a.ts B.ts --forceConsistentCasingInFileNames
error TS1149: File name 'B.ts' differs from already included file name 'C:/dev/sample/a/b.ts' only in casing
Doesn’t work with --pretty
flag enabled too.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:5
- Comments:18 (5 by maintainers)
Top Results From Across the Web
Using Sequelize with TypeScript - LogRocket Blog
Learn how to use a single ORM on multiple database types to switch between databases without rewriting code with TypeScript and Sequelize.
Read more >How to configure Jest with TypeScript - Swizec Teller
Get error messages about compiled instead of source code; Have to debug compiled JavaScript and manually relate back to TypeScript source code.
Read more >Build a 100 Days of Code Discord Bot with TypeScript ...
Today I am going to show you how to build your own 100 Days of Code bot. Note that discord.js has released version...
Read more >A guide through The Wild Wild West of setting up a mono repo ...
In the next article, we will focus on how to get Jest working. ... but the package itself doesn't contain any changes from...
Read more >Create react app typescript does not load d.ts file
Whether or not you include an export statement in these files, the app should compile. However, the export statement will prevent your code...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve been able to accurately reproduce this bug (in a single project) by using
forceConsistentCasingInFileNames
set totrue
and using theextends
keyword. By removing the extends, the bug goes away. However, I’m not always seeing this in every project that utilizes this schema. I have randomly hit this bug.@Delagen – not sure, but maybe this is the issue you were facing? #16875
It happens reliably when using the
extends
property intsconfig.json
.