question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

forceConsistentCasingInFileNames error message doesn't contain enough information

See original GitHub issue

TypeScript 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:open
  • Created 8 years ago
  • Reactions:5
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
nickzeleicommented, Nov 22, 2017

I’ve been able to accurately reproduce this bug (in a single project) by using forceConsistentCasingInFileNames set to true and using the extends 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.

1reaction
bitjsoncommented, Jun 30, 2017

@Delagen – not sure, but maybe this is the issue you were facing? #16875

It happens reliably when using the extends property in tsconfig.json.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found