Skip to content

tsc capitalizing file name. #5371

Closed
Closed

Description

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?

Activity

  1. vladima commented on Oct 22, 2015

    @vladima
    Contributor

    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

  2. DavidSouther commented on Oct 22, 2015

    @DavidSouther
    ContributorAuthor

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

  3. locked and limited conversation to collaborators on Jun 19, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions