-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Description
Description
Due to #51545, @wordpress/block-editor
now has a transitive peer dependency on @emotion/react
. This is unexpected, I'd think it should be like @wordpress/components
where the dependency is hidden from the end user.
Step-by-step reproduction instructions
- In a fresh directory, create
.npmrc
likestrict-peer-dependencies=true auto-install-peers=false
- Run
pnpm add @wordpress/components react react-dom
. Ignore the warnings about reakit and react-autosize-textarea. Other than those, observe that it completes successfully. - Run
pnpm add @wordpress/block-editor react react-dom
. Observe it reports an error about "missing peer @emotion/react@^11.0.0-rc.0".
You can see something similar using yarn's PnP.
Screenshots, screen recording, code snippet
Pnpm outputs in part
WARN Issues with peer dependencies found
.
└─┬ @wordpress/block-editor 12.5.0
├─┬ @emotion/styled 11.11.0
│ └── ✕ missing peer @emotion/react@^11.0.0-rc.0
[...]
Peer dependencies that should be installed:
@emotion/react@^11.0.0-rc.0
Yarn outputs in part
➤ YN0002: │ @wordpress/block-editor@npm:12.5.0 [dc3fc] doesn't provide @emotion/react (p04603), requested by @emotion/styled
Environment info
- node v18.13.0
- pnpm 8.6.6
- yarn 3.6.1
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Metadata
Metadata
Assignees
Labels
No labels