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

rror [ERR_REQUIRE_ESM]: require() of ES Modulee #102

Open
ryanhugh opened this issue May 25, 2023 · 3 comments
Open

rror [ERR_REQUIRE_ESM]: require() of ES Modulee #102

ryanhugh opened this issue May 25, 2023 · 3 comments

Comments

@ryanhugh
Copy link

The latest version 7.0.0 causes this error:

error [ERR_REQUIRE_ESM]: require() of ES Module /.../node_modules/queue/index.js from /mycode/sandbox.ts not supported.
Instead change the require of index.js in /mycode/sandbox.ts to a dynamic import() which is available in all CommonJS modules.

I didn't get this error in v6. I'm about to downgrade to v6. I don't have type: module in my package.json and cannot add that. All the other packages work without that.

@jessetane
Copy link
Owner

v7+ are ESM only but feel free to use older versions if you need commonjs support

@ItaloSa
Copy link

ItaloSa commented Jun 3, 2023

I got this error running with Nestst. Seems they don't support ESM yet (nestjs/nest#11046 (comment)). Downgrade to ^6 solves.

@kashesandr
Copy link

Faced with this as well

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

4 participants