Skip to content

Issues with Language Server when vue file is not open initially #5037

@fardolieri

Description

@fardolieri

Vue - Official extension or vue-tsc version

v2.1.10

VSCode version

1.95.3

Vue version

3.5.13

TypeScript version

5.6.3

System Info

System:
    OS: Linux 6.9 Pop!_OS 22.04 LTS
    CPU: (16) x64 AMD Ryzen 7 2700X Eight-Core Processor
    Memory: 14.78 GB / 31.29 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.15.1 - ~/.volta/tools/image/node/20.15.1/bin/node
    npm: 10.7.0 - ~/.volta/tools/image/node/20.15.1/bin/npm
    pnpm: 7.0.0-rc.9 - ~/.local/share/pnpm/pnpm
    bun: 1.1.12 - ~/.bun/bin/bun
  Browsers:
    Chrome: 131.0.6778.85

package.json dependencies

"dependencies": {
    "vue": "^3.5.13"
  },
  "devDependencies": {
    "@vitejs/plugin-vue": "^5.2.1",
    "typescript": "~5.6.2",
    "vite": "^6.0.1",
    "vue-tsc": "^2.1.10"
  }

Steps to reproduce

  1. Create a new project using npm create vite@latest vue-example2 -- --template vue-ts and have the VSCode extension Vue - Official installed.
  2. Open ./src/components/HelloWorld.vue and restart VSCode
  3. The file should be open automatically and the Vue Language Server should be up and running. Type information is showing on hover.
  4. Close the file and reopen VSCode
  5. The file should not be open
  6. When opening ./src/components/HelloWorld.vue the Vue Language Server is in a broken state and doesn't show type information.

Recording 2024-12-09 at 14 08 21

What is expected?

The Vue Language Server should run regardless of the action order.

What is actually happening?

The Vue Language Server is in a broken state and doesn't show type information.

Link to minimal reproduction

No response

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    good reproduction ✨This issue provides a good reproduction, we will be able to investigate it first🔨 p3-minor-bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions