-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
v5 can break due to subpath imports - node+deno unable to resolve core modules re imports map #75
Comments
same issue with deno |
Dang Deno too eh. I will update the issue title to include Deno. I would throw out there that a vote against using this node feature in p-limit (and perhaps other popular sindresorhus packages) is the discussion here: nodejs/node#49182 The point being: given the lengthy discussion (not to mention the related issue with node + require w/ subpath imports), the nuances of this feature looks to still be up in the air and details for how to implement it are still being fleshed out (and therefore may not be stable either). |
Someone else reported a similar issue with esbuild |
@JonathonRP gotcha, thanks for the tip Note tsx uses esbuild under the hood and is what I was using that led to me encountering + reporting this issue in the first place. For future note if you comment with the issue link (or link direct to the specific comment), or if you reference the issue id, GitHub will take care of adding the mention to the issue feeds. Its fewer keystrokes than typing out "someone else reported..." and has the benefit of linking things up and tying them together :) I'm going to comment over on #76 now how this is related |
Edit: Opened denoland/deno#21576 and fixed in Deno 1.39.1 |
Seems to also fail in tsup with:
|
@segevfiner for sure thanks for the explicit confirmation. tsup uses esbuild, the same as tsx (which is what I was using when I first hit and reported this issue) so unfortunately this can be expected. You can downgrade p-limit to v 4.x and it should work for you. |
I had a similar issue using tsx with p-limit v5. Downgrading to v4 fixed the issue (thanks @firxworx!) Here's the error I had to help other people searching:
|
Seems like it is an issue in Node.js itself: nodejs/node#49257 |
I reported this: nodejs/node#51009
initially reported to tsx here: privatenumber/tsx#425
The minimal repro from the tsx issue (on StackBlitz) uses
p-limit
for the demo.I encountered the issue when bumping packages in a TypeScript cli project to current (including bumping p-limit v4 to v5) that runs via
tsx
(withmodule
"ESNext" in the tsconfig).The trigger of the issue in p-limit is right here:
v4.0.0...v5.0.0#diff-e727e4bdf3657fd1d798edcd6b099d6e092f8573cba266154583a746bba0f346R2
Given the circumstances I'm not sure if you want to do anything differently, however I figured I'd create an issue here to put it on your radar, in case you want to accommodate on account of the popularity of this package. Thanks!
The text was updated successfully, but these errors were encountered: