vuejs / vetur

Vue tooling for VS Code.
https://vuejs.github.io/vetur/
MIT License
5.75k stars 594 forks source link

auto import problem #2850

Open fuxichen opened 3 years ago

fuxichen commented 3 years ago

Info

Problem

Hello, I recently encountered a problem. Vetur's auto import is importing nodes_ The path of the file in modules will change to node_modules/vue/dist/vue image image

It should be normal image

Look forward to your reply,thank you!

Reproducible Case

yoyo930021 commented 3 years ago

What content is your tsconfig.json?

fuxichen commented 3 years ago

What content is your tsconfig.json?

是vuecli 生成的vue3+ts默认内容 It is the default content of vue3 + TS generated by vuecli image

yoyo930021 commented 3 years ago

Please provide a repro case. https://github.com/vuejs/vetur/blob/master/.github/NO_REPRO_CASE.md.

fuxichen commented 3 years ago

请提供一个复制案例。 https://github.com/vuejs/vetur/blob/master/.github/NO_REPRO_CASE.md。 我克隆了https://github.com/octref/veturpack project这个项目,并且使用虚拟机安装了一个全新的vscode和vetur。没有修改任何内容,但是还是出现了该问题 I cloned the https://github.com/octref/veturpack project and installed a new vscode and vetur using the virtual machine. Nothing was changed, but the problem still occurred image image image image image

fuxichen commented 3 years ago

你好,我将vetur版本降级到0.32.0,这个问题就解决了。感谢您的帮助! 我期待着您在新版本中发现并解决这个问题。 Hello, I downgraded the version of vetur to 0.32.0, and this problem was solved. Thank you for your help! I look forward to your finding and solving this problem in the new version。 image image

yoyo930021 commented 3 years ago

I can't repro it.

截圖 2021-04-11 上午12 09 26

and this question isn't in vetur, It is an upstream problem in typescript. You can try to use next release vetur. vetur will upgrade typescript to the latest. Or use vetur.useWorkspaceDependencies: true for using custom typescript version.

You can open an issue to typescript project when the existing problem the latest typescript version.