vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.84k stars 397 forks source link

vue component imports from node_modules are not being resolved #4611

Open brc-dd opened 3 months ago

brc-dd commented 3 months ago

Vue - Official extension or vue-tsc version

2.0.28

VSCode version

1.92.0-insider (22e3447)

Vue version

3.4.33

TypeScript version

5.5.4

System Info

System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M2 Pro
    Memory: 512.38 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.2.0 - ~/.local/state/fnm_multishells/86941_1721795272757/bin/node
    Yarn: 1.22.22 - ~/.local/state/fnm_multishells/86941_1721795272757/bin/yarn
    npm: 10.7.0 - ~/.local/state/fnm_multishells/86941_1721795272757/bin/npm
    pnpm: 9.6.0 - ~/.local/state/fnm_multishells/86941_1721795272757/bin/pnpm
    bun: 1.1.17 - /opt/homebrew/bin/bun
  Browsers:
    Safari: 17.5
    Safari Technology Preview: 18.0

Steps to reproduce

  1. Clone https://github.com/brc-dd/volar-component-resolution-bug
  2. Install deps - pnpm i
  3. Open Foo.vue to see errors: image

What is expected?

No error and intellisense on component props to work.

What is actually happening?

Getting ts-plugin 2307 error.

Link to minimal reproduction

https://github.com/brc-dd/volar-component-resolution-bug

Any additional comments?

davidmatter commented 3 months ago

Confirmed, used to behave differently in 2.0.22

davidmatter commented 2 months ago

You can mitigate this by adding node_modules/vitepress/**/* to tsconfig/include.