Skip to content
Discussion options

You must be logged in to vote

@kleinfreund the issue is that vue-tsc uses TypeScript's standard module resolution, which doesn't understand pnpm's .pnpm symlink structure. vite/vitest have their own enhanced resolution that follows these symlinks. tsc doesn't.

the targeted fix is public-hoist-pattern in .npmrc for just the problematic transitive deps:

public-hoist-pattern[]=@problematic/transitive-dep
public-hoist-pattern[]=@types/whatever-is-missing

this hoists only those specific packages to the root node_modules/ where tsc can find them. it's a scalpel vs shamefullyHoist's sledgehammer.

alternatively, just add the missing transitive deps as explicit devDependencies. if tsc needs to resolve them for type-checking, t…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@kleinfreund
Comment options

@sunnypatell
Comment options

@sunnypatell
Comment options

@kleinfreund
Comment options

Answer selected by kleinfreund
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants