-
-
Notifications
You must be signed in to change notification settings - Fork 597
yarn@berry support. #1711
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
Comments
A way to have the VLS use the tsserver and tsc pointed at by the As a workaround in my current project I'm adding |
then theres no point of using yarn@berry if i do so. |
I'm not sure what I can do to fix this. What does yarn@berry do different than yarn v1 to modules? Does TS support it? |
Yarn v2 defaults to PnP (which is in v1 too, but not enabled by default), which basically means TypeScript currently doesn't natively support PnP, but v2 users get a patched version that does support PnP automatically upon installation. So for the TypeScript language server to work correctly, it needs to use the user-installed version while under PnP environments for now. Basically, instead of assuming installed module files are stored under @arcanis I'd like to explain this in more detail, but I don't really know the internals that much. :/ |
That's a good explanation 😃
I'm not familiar with Vetur, but this seems the best option to me if that's compatible with your architecture. Looking at #682, it seems this is already possible if the users configure |
That is correct and we use the workspace version of TS to resolve modules:
|
I've made a quick PR as a proof of concept, so everyone get the idea. This kind of implementation would work IMHO. |
This #1737 PR seems to be a good quick solution, I believe it is ready to review |
Any updates on this? Hoping to have intellisense working |
@chriswoodle if anything, as a workaround I compiled my own Vetur (on the above PR branch) and work with it for months already, works A-OK! |
fix(#1711) Get workspace typescript with the tsdk path (yarn@berry compat)
Fixed in #1737. |
Info
Problem
as you can see from the picture above, it warns user that module has not found (this also includes built-in) whilst its not.
never had this problem without yarn@berry.
Reproducible Case
on existing or freshly forged project, with
yarn@berry
either globally or scoped install,run
yarn install
.then in
.vue
files, try import any of modules (built-in or external, native(java|type)script
works fine though)The text was updated successfully, but these errors were encountered: