-
-
Notifications
You must be signed in to change notification settings - Fork 484
Closed
Description
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
)
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
Metadata
Metadata
Assignees
Labels
No labels