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

0.38.4 causes errors when ts files import vue files #1559

Closed
Zazcallabah opened this issue Jul 11, 2022 · 1 comment
Closed

0.38.4 causes errors when ts files import vue files #1559

Zazcallabah opened this issue Jul 11, 2022 · 1 comment

Comments

@Zazcallabah
Copy link

Last week my vue router config worked fine. Today, the router.ts file is full of errors.

Specifically, it seems that in a typescript-file, any imports of vue-files give the error Cannot find module '../views/HomeView.vue' or its corresponding type declarations.

This happens in all my vue projects. It also happens if I reinstall a clean vscode and create a new vue3 project with npm init.

Steps to reproduce

From a clean vscode install:

npm init vue@latest

√ Project name: ... vue-project
√ Add TypeScript? ... Yes
√ Add JSX Support? ... No
√ Add Vue Router for Single Page Application development? ... Yes
√ Add Pinia for state management? ... Yes
√ Add Vitest for Unit Testing? ... Yes
√ Add Cypress for End-to-End testing? ... No
√ Add ESLint for code quality? ... Yes
√ Add Prettier for code formatting? ... Yes

cd vue-project
npm i
code .

>> "trust authors"
>> "install recommended plugins"

Then open any ts-file in vscode. (ex ./src/router/index.ts)

image

versions:

  • npm 8.12.1
  • vue 3.2.37
  • vscode 1.69.0
  • vue.vscode-typescript-vue-plugin 0.38.4
  • vue.volar 0.38.4
  • vite 2.9.12
@Zazcallabah
Copy link
Author

To clarify, it is vue.vscode-typescript-vue-plugin that causes the issue - or rather, downgrading that extension to 0.38.3 makes the issue disappear.

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

1 participant