Skip to content

fix: Add missing @emotion/react peer dependency to native and primitives packages(#3351)#3357

Open
SeoJaeWan wants to merge 3 commits intoemotion-js:mainfrom
SeoJaeWan:fix/missing-peer-dependencies-3351
Open

fix: Add missing @emotion/react peer dependency to native and primitives packages(#3351)#3357
SeoJaeWan wants to merge 3 commits intoemotion-js:mainfrom
SeoJaeWan:fix/missing-peer-dependencies-3351

Conversation

@SeoJaeWan
Copy link

What:

Add @emotion/react as a peer dependency to @emotion/native and @emotion/primitives packages.

Why:

Fixes #3351

Both @emotion/native and @emotion/primitives depend on @emotion/primitives-core, which requires @emotion/react as a peer dependency (it imports ThemeContext from @emotion/react). However, neither package declared this transitive peer dependency, causing npm/yarn to not warn users when @emotion/react is missing.

How:

  • Added @emotion/react: ^11.0.0-rc.0 to peerDependencies in packages/native/package.json
  • Added react: >=16.8.0 to peerDependencies in packages/native/package.json (was also missing)
  • Added @emotion/react: ^11.0.0-rc.0 to peerDependencies in packages/primitives/package.json

These version ranges match the peer dependency declarations in @emotion/primitives-core and @emotion/styled.

Checklist:

  • Documentation N/A
  • Tests N/A
  • Code complete
  • Changeset

@changeset-bot
Copy link

changeset-bot bot commented Jan 10, 2026

🦋 Changeset detected

Latest commit: 1966617

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@emotion/native Patch
@emotion/primitives Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@SeoJaeWan SeoJaeWan changed the title Add missing @emotion/react peer dependency to native and primitives packages fix: Add missing @emotion/react peer dependency to native and primitives packages Jan 10, 2026
@SeoJaeWan SeoJaeWan changed the title fix: Add missing @emotion/react peer dependency to native and primitives packages fix: Add missing @emotion/react peer dependency to native and primitives packages(#3351) Jan 10, 2026
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@emotion/native missing the peer dependency @emotion/react

1 participant