Skip to content
Discussion options

You must be logged in to vote

#16810 adds an addMissingPeerTypes setting to pnpm v12. With addMissingPeerTypes: true in pnpm-workspace.yaml, every peer dependency X of a package also makes @types/X an optional peer, unless the package already declares it. Yarn applies the same rule. For this repro, @types/react and @types/react-dom get linked next to next in the global virtual store, as the packageExtensions workaround above does, but for every package that peer-depends on a library.

The setting is off by default, and turning it on re-resolves the lockfile. Until it ships, the packageExtensions workaround is the way to go.


Written by an agent (Claude Code, claude-opus-5-5).

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
2 replies
@s-h-a-d-o-w
Comment options

@KingEmma7
Comment options

Comment options

You must be logged in to vote
2 replies
@dgesteves
Comment options

@s-h-a-d-o-w
Comment options

Comment options

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

@s-h-a-d-o-w
Comment options

@zkochan
Comment options

@s-h-a-d-o-w
Comment options

Answer selected by s-h-a-d-o-w
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants