-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Could not resolve "#node-web-compat" - subpath imports with esbuild and yarn pnp #2545
Comments
Thanks for the report. It looks like the code that handles subpath imports and the code that handles Yarn PnP are probably just in the wrong order. I will fix this in the next release. |
Wait, does Yarn actually even allow this? I tried writing a test for this but Yarn throws this error when I run the test code natively with Yarn:
If Yarn doesn't allow this, then maybe esbuild shouldn't either? Or maybe this is a bug with Yarn that should be fixed? Here's a simple way to reproduce this:
Edit: Marking this issue as |
Seems like this is an open issue in yarn, sorry. I didn't find it at first because it doesn't call the feature "subpath imports". (also unrelated: damn, you're fast 😁) |
Describe the bug
I'm facing an issue with subpath imports (as used in aws-jwt-verify) in combination with yarn berry and esbuild.
Build fails with
Workaround is to use a different linker mode in yarn, e.g. pnpm
To Reproduce
Reproducer can be found here.
Note: This issue was also reported here, but it seems more related to esbuild.
The text was updated successfully, but these errors were encountered: