Skip to content

tsgo doesn't allow importing from a commonJS module in a way that tsc does allow. #1054

Open
@joshcartme

Description

@joshcartme

repro: https://github.com/joshcartme/tsgo-esm-commonjs-import-bug

In the repro:

$ yarn run tsc

Done in 0.55s.
$ yarn run tsgo

index.ts:1:21 - error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'esModuleInterop' flag and referencing its default export.

1 import { foo } from "./shared.vars";
                      ~~~~~~~~~~~~~~~

Found 1 error in index.ts:1

error Command failed with exit code 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: Module ResolutionRelated to module resolution and module checker errors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions