Skip to content

Types are not resolved when exported from vue file in monorepo setup #4607

@minht11

Description

@minht11

Vue - Official extension or vue-tsc version

v2.0.28

VSCode version

1.91.1

Vue version

3.4.33

TypeScript version

5.5.3

System Info

System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1
    Memory: 71.83 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - ~/.proto/shims/node
    Yarn: 1.22.22 - ~/.proto/shims/yarn
    npm: 10.2.4 - ~/.proto/shims/npm
    pnpm: 9.6.0 - ~/.proto/shims/pnpm
  Browsers:
    Brave Browser: 126.1.67.123
    Chrome: 126.0.6478.183
    Chrome Canary: 128.0.6612.0
    Edge: 126.0.2592.113
    Safari: 17.5

Steps to reproduce

  1. Clone repo
  2. Launch it in VSCode
  3. Observe error, because types from exported package are not resolved.
Screen.Recording.2024-07-23.at.02.31.18.mov

What is expected?

Imported type is unresolved

What is actually happening?

Import type should be resolved.

Link to minimal reproduction

https://github.com/minht11/vue-tsc-monorepo-import

Any additional comments?

This took a lot of time to narrow down. Having additional files made it work/fail. I do not see error when running CLI, but I do see it in my larger project, this is a problem from at least 2.0.22.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions