Skip to content
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

require() unsupported for ESM module #7

Open
AleksandrSokolov opened this issue Jul 7, 2021 · 0 comments
Open

require() unsupported for ESM module #7

AleksandrSokolov opened this issue Jul 7, 2021 · 0 comments

Comments

@AleksandrSokolov
Copy link

All examples https://github.com/krocon/find-duplicate-files#readme cannot work because of project update to ES6 (ESM).

We cannot use require() with ESM modules.

So correct examples will start with:

import { findDuplicateFiles } from 'find-duplicate-files';

And in package.json for script needs to add package type:

"type": "module",

Only after that it works.

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