You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example when I install @emotion/react which has a optional peer dependency on @babel/core. We are not installing @babel/core as it not required for our build.
I tried to ignore it by setting in the projects's package.json
as recommended by pnpm, but that does not seem to work within a rush repo. It works normally in a pnpm project just fine.
This prevents our projects from using strict peer dependencies, as it throws an error. Furthermore, it makes the rush update output quite verbose and full of warnings.
We just run PNPM install when performing rush install, so I'm unsure why this wouldn't be working for you. Our own modifications on top of this are limited to .pnpmfile.cjs and generate a workspace file. Have you tried doing this with a vanilla PNPM workspace?
@D4N14L thank you for your input, it helped me with further investigation. It turns out in a pnpm workspace, the pnpm key must be specified in the root package.json. pnpm/pnpm#4306 (comment). Since rush does not expose the root package.json, is there any way we could specify it?
Summary
For example when I install
@emotion/react
which has a optional peer dependency on@babel/core
. We are not installing@babel/core
as it not required for our build.I tried to ignore it by setting in the projects's package.json
as recommended by pnpm, but that does not seem to work within a rush repo. It works normally in a pnpm project just fine.
This prevents our projects from using strict peer dependencies, as it throws an error. Furthermore, it makes the rush update output quite verbose and full of warnings.
Repro steps
https://github.com/anantoghosh/rush-peer
Details
Current workaround is to install all the optional peers as well, but that may lead to unintended effects under certain cases.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/rush
globally installed version?rushVersion
from rush.json?useWorkspaces
from rush.json?node -v
)?The text was updated successfully, but these errors were encountered: