Skip to content

Path casing in require #1502

Closed
Closed

Description

@FilippoPolo

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.

Activity

  1. mhegazy commented on Dec 16, 2014

    @mhegazy
    Contributor

    +1 for better error message.

  2. modified the milestones: , TypeScript 2.0 on Apr 2, 2015
  3. benliddicott commented on Sep 8, 2015

    @benliddicott

    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.

  4. modified the milestones: TypeScript 1.8, on Oct 15, 2015
  5. vladima commented on Oct 27, 2015

    @vladima
    Contributor

    #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

  6. vladima commented on Oct 27, 2015

    @vladima
    Contributor

    fixed in e811fec

  7. locked and limited conversation to collaborators on Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions