Skip to content

Compile errors when using from Docker. #246

Open
@richardspence

Description

@richardspence

When building browserify from docker, tsify will complain about "cannot find module abc". I noticed casing anomalies during output, and after some investigation/debugging determined it's related to normalizing filenames in host.js that is somehow not working as expected when executing from a docker environment.

repro: (on mac, simplified steps)

  1. create a new project

  2. Add a repro.d.ts file that imports a module
    a. npm i -S @types/events' b. in repro.d.ts file i. add imports {EventEmitter} from 'events'`
    ii. Export something
    bundle with browserify, and tsify plugin, default options (I used the CLI)
    expected: output.
    actual: output.

  3. In a docker image, do the same process. Mount local file system into docker

expected: output.
Actual: TS Errors complaining about 'cannot find module'

Workaround: set "forceConsistentCasingInFileNames": true, in tsconfig. This is read by Host.js to normalize filenames which is related to this bug.

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