Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected missing peer dependency in @wordpress/block-editor 12.5.0 #52474

Closed
anomiex opened this issue Jul 10, 2023 · 0 comments · Fixed by #52475
Closed

Unexpected missing peer dependency in @wordpress/block-editor 12.5.0 #52474

anomiex opened this issue Jul 10, 2023 · 0 comments · Fixed by #52475
Assignees

Comments

@anomiex
Copy link
Contributor

anomiex commented Jul 10, 2023

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

  1. In a fresh directory, create .npmrc like
    strict-peer-dependencies=true
    auto-install-peers=false
    
  2. 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.
  3. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants