Closed btakita closed 8 months ago
same issue with deno
Im also seeing this with esbuild when importing plimit
FYI package imports with #
prefix are NodeJS subpath imports: https://nodejs.org/api/packages.html#subpath-imports
I reported the following issue earlier which appears related: https://github.com/sindresorhus/p-limit/issues/75 (also see the related issue linked there re nodejs itself)
I honestly wonder a bit how @sindresorhus hasn't hit this issue himself now that it seems like a huge chunk of the ecosystem is impacted!
This issue reproduced also when trying to run typescript apps with ts-node
https://github.com/oven-sh/bun/pull/3089 seems related
Same issue with jest and SWC transpilation:
import pLimit from "p-limit";
pLimit(100)(async () => "test");
Leads to this error:
no such file or directory, open 'async_hooks'
And it doesn't matter what I change in tsconfig
or jest.config
to use ESM or ignore transpilation.
Hmm - Hope anyone can resolve this soon.
Bun has fixed this on their end. Works for me (tested on bun v1.0.30).
@sindresorhus I think there are a couple duplicates of this issue in the tracker. Heads up.
Using the following works with bunjs: