Skip to content

Path casing in require #1502

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
FilippoPolo opened this issue Dec 16, 2014 · 4 comments
Closed

Path casing in require #1502

FilippoPolo opened this issue Dec 16, 2014 · 4 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this

Comments

@FilippoPolo
Copy link

The path specified in the require keyword is case-sensitive. There are good reasons for that, but it can be confusing, especially given that a project folder in Visual Studio Solution Explorer can have a different casing from the corresponding filesystem folder. It is entirely possible for a project to look like everything is correct in VS, including the casing, and still get "unable to resolve".

It would be nice if, in cases where a module cannot be found, but a module with the same path in different case exists, the compiler gave some kind of hint or warning.

@mhegazy
Copy link
Contributor

mhegazy commented Dec 16, 2014

+1 for better error message.

@mhegazy mhegazy added the Bug A bug in TypeScript label Dec 16, 2014
@sophiajt sophiajt added this to the TypeScript 2.0 milestone Jan 12, 2015
@mhegazy mhegazy modified the milestones: Community, TypeScript 2.0 Apr 2, 2015
@mhegazy mhegazy added the Help Wanted You can do this label Apr 2, 2015
@mhegazy mhegazy removed their assignment Apr 2, 2015
@benliddicott
Copy link

see also #3626 and #2011
My vote: If it's going to fail anywhere make it fail everywhere and fail fast and with a good message.

@mhegazy mhegazy modified the milestones: TypeScript 1.8, Community Oct 15, 2015
@vladima
Copy link
Contributor

vladima commented Oct 27, 2015

#5275 introduces a flag forceConsistentCasingInFileNames - when it is set compiler will report an error if some file has multiple references with inconsistent casing inside the program

@vladima vladima added the Fixed A PR has been merged for this issue label Oct 27, 2015
@vladima
Copy link
Contributor

vladima commented Oct 27, 2015

fixed in e811fec

@vladima vladima closed this as completed Oct 27, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

5 participants