Skip to content

0.38.4 causes errors when ts files import vue files #1559

@Zazcallabah

Description

@Zazcallabah

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions