-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Yarn 3 incompatibility #918
Comments
Hi @orimay, first thanks for the report! I'm not familiar with yarn3, do I just need to switch to yarn v3 and can this problem reproduce in https://github.com/johnsoncodehk/volar-starter too? I will check it later. |
Hello, @johnsoncodehk! I installed latest Yarn with the use of its PnP feature, which gets rid of node_moules folder. It serves its own scripts for tsserver like here: |
Could you provide a reproduction? I have Volar working with PnP in my projects. |
Oh, sorry, I forgot to mention that I also use Yarn 3 workspaces, and that's the part I'm struggling with. I only mentioned it in my first post |
This comment was marked as resolved.
This comment was marked as resolved.
@orimay I was able to create a simple project that uses yarn pnp and workspaces. Made a couple of dumb mistakes along the way, but ended up with a sanity verifying checklist which might be helpful:
|
here's a reproduction repository: https://github.com/adalinesimonian/volar-pnp-test i've tested this in a workspace and without and it happens either which way. |
testing further, the language server does receive the correct workspace configuration which includes the path to the typescript pnp sdk:
does volar respect the typescript location in vscode settings? |
i added some logs into volar's
continuing to dig further |
@adalinesimonian Downgrade to |
downgraded to 4.8.3. now, in a single repo, it works as expected. however, in a monorepo, the same resolution errors occur. here's a reproduction monorepo: https://github.com/adalinesimonian/volar-workspaces-pnp-test |
Sorry i'm not familiar with this part, I assume that we just need setting the yarn 3 version tsdk to I will add documentation for it. (If I'm right) |
In Volar "Take-over" mode TS/JS language server gets completelly replaced by Vue + TS server, which presumably doesn't recognise ts sdk provided by yarn |
@adalinesimonian The error I get in that repo is
If I then set the
@johnsoncodehk
@Lexpeartha it recognizes it. |
I am still unable to get the "Go To Definition" feature of VS Code to work when using Yarn PnP and Volar. There has been an issue open with Yarn for several years without fix. Is this something that could be fixed from Volar side instead? |
Thank you for the awesome extension! I loved using it with takeover mode, but it seems completely broken as of moving off to Yarn 3 without the node_modules folder.
First of all, it doesn't seem to work with Yarn 3 relative path workspaces. If I have my dependency like
I can't refer to it like
And get to refer to it like
instead.
Even though without Volar, Yarn 3 workspaces are perfectly handled.
If I disable Take Over Mode, Vue TS checks fail completely:
Then, VSCode shows two tooltips rather than one:
If Volar has any issues that VSCode has not, these messages differ:
The upper one finds the module, the lower one (Volar) does not.
Last, but not least -- Volar doesn't import packages from .yarn:
Is Yarn 3 support not intended? I really wish it was working. Hope it's not much of a headache to fix this. Thank you in advance!
The text was updated successfully, but these errors were encountered: