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

Error: code: 'ERR_REQUIRE_ESM' in TS #65

Closed
julianblanco00 opened this issue Oct 6, 2022 · 5 comments
Closed

Error: code: 'ERR_REQUIRE_ESM' in TS #65

julianblanco00 opened this issue Oct 6, 2022 · 5 comments

Comments

@julianblanco00
Copy link

Hi, I have the following code

import pLimit from 'p-limit' const limit = pLimit(8)

And I receive an error in my console:
var _pLimit = _interopRequireDefault(require("p-limit"));

@sindresorhus
Copy link
Owner

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2022
@strowk
Copy link

strowk commented Nov 8, 2022

I am getting this error even by using import pLimit from 'p-limit';

@simplenotezy
Copy link

Same here - can't use p-limit in a nest.js framework

@simplenotezy
Copy link

Switched to version 3 solves the issue for now

@TomlDev
Copy link

TomlDev commented Feb 12, 2024

Same here using v5.
Downgrading to v3 worked.

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

5 participants