Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Typescript import error #278

@dplewis

Description

@dplewis

I get the following message running version 2.1.0

TS1259: Module '"/Users/xxx/Documents/GitHub/xxx/node_modules/deepcopy/index"' can only be default-imported using the 'esModuleInterop' flag

26 import deepcopy from 'deepcopy';
          ~~~~~~~~

  node_modules/deepcopy/index.d.ts:4:1
    4 export = deepcopy;
      ~~~~~~~~~~~~~~~~~~
    This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

I'm not sure why it's export =

export { deepcopy } from './src/index';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions