Skip to content

tsc capitalizing file name. #5371

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

Closed
DavidSouther opened this issue Oct 22, 2015 · 2 comments
Closed

tsc capitalizing file name. #5371

DavidSouther opened this issue Oct 22, 2015 · 2 comments

Comments

@DavidSouther
Copy link
Contributor

https://github.com/DavidSouther/rupert/tree/ts-master

In this project, ./src/di/binding.ts gets compiled to ./dist/di/Binding.{d.ts,js,js.map} (Notice the capitalized Binding.) When its siblings then `import { } from './binding' in dependent projects, TSC fails because that file isn't present.

What arcane things might I have done to cause this to compile that way?

@vladima
Copy link
Contributor

vladima commented Oct 22, 2015

this happens because src/di/di.ts imports this file as './Binding'. On case-insensitive file systems both ./Binding and ./binding refer to the same file and internally we just store the name that we met first.

NOTE #5275 adds a flag to force consistent naming on case-insensitive systems. If I use it to compile your example I get error TS1149: File name 'src/di/binding.ts' differs from already included file name 'src/di/Binding.ts' only in casing

@DavidSouther
Copy link
Contributor Author

OMG I looked at that import like three times. Thanks :)

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants