-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Bug?]: cannot import xo from a module using PNP #3708
Comments
Any help with this? I can’t seem to figure out if |
Using the experimental ESM support requires starting Node with the |
I see. With that, I get the server to listen, but it still doesn’t seemt to work 🤔 https://github.com/flying-sheep/react-color-scheme-switch/pull/3/files
But “Language Client is not ready yet” if I want to trigger a code action. |
This comment has been minimized.
This comment has been minimized.
C’mon, I thought someone had finally time to check this out, instead I get a bot … No idea how I can reproduce this in sherlock. |
I looked into it and It looks like you're running into nodejs/node#39140 |
Thank you so much for helping! I think VS Code handles the actual subprocess spawning and message passing, so maybe this is a race condition in VS Code, that PNP is slow enough to trigger? |
It's not PnP, it's because of ESM (see the issue I linked) |
I see! It could still be a race condition (if xo-without-pnp loads fast enough, it won’t trigger the bug), but I should probably just wait for nodejs/node#41134 to be fixed for this, as there’s only 2 reliable fixes:
Thank you! I’ll close this, and if it turns out there’s another issue that looks to be on yarn’s side, I’ll reopen it. |
With node 17.4 we can make progress! See #4045 |
Self-service
Describe the bug
I’m trying to create a SDK package for VS Code’s
xo
linter https://github.com/xojs/vscode-linter-xoBut PnP doesn’t seem to work with
import()
. Am I doing something wrong?I did specify
pnpEnableEsmLoader: true
in myyarnrc.yml
.To reproduce
Create the
SDK
and try to import itEnvironment
Additional context
No response
The text was updated successfully, but these errors were encountered: