Skip to content
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

Ends up to (最终停在了) shims.d.ts #3

Closed
5 tasks done
grandsong opened this issue Oct 13, 2022 · 5 comments
Closed
5 tasks done

Ends up to (最终停在了) shims.d.ts #3

grandsong opened this issue Oct 13, 2022 · 5 comments

Comments

@grandsong
Copy link

Describe the bug

I created a project based on Vitesse Lite, installed this extension and it worked well.
But recently, after I updated Volar (which is 1.0.3) and all NPM packages, this extension on longer works as expected.
Now, if I alt+click a component in a .vue SFC, VS Code opens a tab for "components.d.ts" and immediatly opens another for "shims.d.ts" and ends up there.


I read unplugin/unplugin-vue-components#177
So I checked ".npmrc", "shamefully-hoist=true" remains as it was.
I also added @vue/runtime-core to devDependencies. No luck.
I disabled this extension, or moved "shims.d.ts", either way, clicks ended up to "components.d.ts". So, the two are still necessary.
I don't know what else I could try.


the minimal reproduction

I just use Vitesse Lite template on GitHub to create one repo.
Then, I updated all NPM packages.
I tried clicking

in App.vue. This issue can be reproduced.

Reproduction

https://github.com/grandsong/reproduction

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (12) x64 Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz
    Memory: 1.65 GB / 15.84 GB
  Binaries:
    Node: 16.17.0 - C:\Env\node\node.EXE
    npm: 7.9.0 - C:\Env\node\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (106.0.1370.42)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@VoVAllen
Copy link

Same problem

@misbahansori
Copy link

I am also experiencing the same issue, but after enabling the Takeover mode of Volar, clicking on a component in VS Code causes a new tab for "components.d.ts" to open and then correctly display the component.

Ideally, I don't want it to open "components.d.ts" but it's not a big deal

@grandsong
Copy link
Author

I have followed the instructions and disabled VS Code built-in TypeScript. But I still ends up with "shims.d.ts".
I have also checked settings where volar.takeOverMode.enabled is "auto".

@laurens94
Copy link

For me the issue was fixed once I added a <script setup></script> block in the .vue component that was not being redirected properly.

@loktarjugg
Copy link

same here
I am using vitesse, and I'm pretty sure the configuration is correct. but it still points to components.d.ts

ShenQingchuan added a commit to ShenQingchuan/vscode-goto-alias that referenced this issue Dec 29, 2023
@antfu antfu closed this as completed in 0f23208 Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants