Skip to content

Typescript import error #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dplewis opened this issue Apr 2, 2025 · 0 comments
Open

Typescript import error #278

dplewis opened this issue Apr 2, 2025 · 0 comments

Comments

@dplewis
Copy link

dplewis commented Apr 2, 2025

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';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant