PNPM install does not differentiate between optional and required peer dependencies in installed packages #4465
anantoghosh
started this conversation in
General
Replies: 1 comment
-
I realize now that for the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I see that when installing a package which defines optional peer with
peerDependenciesMeta
, pnpm does not treat it as optional.For example, in the package
@emotion/react
, https://github.com/emotion-js/emotion/blob/2d3d7dd1d8b0de9dbfd50e42ee716ac00fb70ecd/packages/react/package.json#L41@babel/core
is optional,But pnpm shows
It even throws an error if
strict-peer-dependencies
is enabled.Using pnpm 6.32.3 on windows. I do not know if this behaviour has been changed in v7.
I think two changes are needed here:
Note both yarn 2+ and npm does not show any information at all about the missing optional dependencies.
Beta Was this translation helpful? Give feedback.
All reactions