Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(expo): Resolve Peer Dependency issue for Expo 54 users #7579

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

Conversation

@chriscanin
Copy link
Member

@chriscanin chriscanin commented Jan 9, 2026
edited by coderabbitai bot
Loading

Description

Currently React Native Expo users on Expo 54 who try to install clerk with npm install @clerk/clerk-expo fail unless they supply --legacy-peer-deps when using npm.
We have set in our pnpm-workspace.yaml:

 catalogs:
 peer-react:
 react: ^18.0.0 || ~19.0.3 || ~19.1.4 || ~19.2.3 || ~19.3.0-0
 react-dom: ^18.0.0 || ~19.0.3 || ~19.1.4 || ~19.2.3 || ~19.3.0-0

But Expo 54 expects react 19.1.0, and although you could change that, expo will then warn you to run npx expo install --fix, which will revert your react version to 19.1.0....

But React 19.1.0 is unsafe!! , Expo says, not for us:
https://expo.dev/changelog/mitigating-critical-security-vulnerability-in-react-server-components

I see two paths forward. We document well, and tell users it is safe to force legacy peer dependency resolution, or we can loosen the peer dependencies versions react-native. Not really sure if this is done in other places but possibly overriding that peer-react for react-native like:

 catalogs:
 peer-react:
 react: ^18.0.0 || ~19.0.3 || ~19.1.4 || ~19.2.3 || ~19.3.0-0
 react-dom: ^18.0.0 || ~19.0.3 || ~19.1.4 || ~19.2.3 || ~19.3.0-0
 peer-react-native: # adjusted for client-only Expo apps
 react: ^18.0.0 || ~19.0.0 || ~19.1.0 || ~19.2.0 || ~19.3.0-0

Expo package then sets:

"peerDependencies": {
 "react": "catalog:peer-react-native",
 "react-dom": "catalog:peer-react-native",
 ...
 }

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • Chores
    • Broadened React compatibility to explicitly support React 18 and React 19 in the Expo package peer dependencies.
    • Added a patch changeset to document and release this compatibility update for the Expo package.

✏️ Tip: You can customize this high-level summary in your review settings.

@chriscanin chriscanin self-assigned this Jan 9, 2026
@chriscanin chriscanin added bug Something isn't working expo sdk labels Jan 9, 2026
Copy link

changeset-bot bot commented Jan 9, 2026
edited
Loading

🦋 Changeset detected

Latest commit: ff922a7

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

This PR includes changesets to release 1 package
Name Type
@clerk/expo 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

Copy link

vercel bot commented Jan 9, 2026
edited
Loading

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jan 13, 2026 7:38pm

Copy link
Contributor

coderabbitai bot commented Jan 9, 2026
edited
Loading

📝 Walkthrough

Walkthrough

The peer dependency declarations for react and react-dom in packages/expo/package.json were updated from catalog-based references (catalog:peer-react) to explicit version ranges. Both dependencies now specify compatibility with React 18 and multiple React 19 minor versions through the range ^18.0.0 || ~19.0.0 || ~19.1.0 || ~19.2.0 || ~19.3.0-0. This change replaces the previous resolver mechanism with direct version specifications.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately summarizes the main change: updating peer dependency version ranges for React to resolve installation issues for Expo 54 users.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

pkg-pr-new bot commented Jan 9, 2026
edited
Loading

Open in StackBlitz

@clerk/agent-toolkit
npm i https://pkg.pr.new/@clerk/agent-toolkit@7579
@clerk/astro
npm i https://pkg.pr.new/@clerk/astro@7579
@clerk/backend
npm i https://pkg.pr.new/@clerk/backend@7579
@clerk/chrome-extension
npm i https://pkg.pr.new/@clerk/chrome-extension@7579
@clerk/clerk-js
npm i https://pkg.pr.new/@clerk/clerk-js@7579
@clerk/dev-cli
npm i https://pkg.pr.new/@clerk/dev-cli@7579
@clerk/expo
npm i https://pkg.pr.new/@clerk/expo@7579
@clerk/expo-passkeys
npm i https://pkg.pr.new/@clerk/expo-passkeys@7579
@clerk/express
npm i https://pkg.pr.new/@clerk/express@7579
@clerk/fastify
npm i https://pkg.pr.new/@clerk/fastify@7579
@clerk/localizations
npm i https://pkg.pr.new/@clerk/localizations@7579
@clerk/nextjs
npm i https://pkg.pr.new/@clerk/nextjs@7579
@clerk/nuxt
npm i https://pkg.pr.new/@clerk/nuxt@7579
@clerk/react
npm i https://pkg.pr.new/@clerk/react@7579
@clerk/react-router
npm i https://pkg.pr.new/@clerk/react-router@7579
@clerk/shared
npm i https://pkg.pr.new/@clerk/shared@7579
@clerk/tanstack-react-start
npm i https://pkg.pr.new/@clerk/tanstack-react-start@7579
@clerk/testing
npm i https://pkg.pr.new/@clerk/testing@7579
@clerk/ui
npm i https://pkg.pr.new/@clerk/ui@7579
@clerk/upgrade
npm i https://pkg.pr.new/@clerk/upgrade@7579
@clerk/vue
npm i https://pkg.pr.new/@clerk/vue@7579

commit: ff922a7

Copy link
Member

@tmilewski tmilewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙃 We're going to want to add a changeset for this.

Copy link
Member Author

@tmilewski tmilewski changed the title (削除) fix(clerk-expo): Resolve Peer Dependency issue for Expo 54 users. (削除ここまで) (追記) fix(expo): Resolve Peer Dependency issue for Expo 54 users. (追記ここまで) Jan 13, 2026
@chriscanin chriscanin changed the title (削除) fix(expo): Resolve Peer Dependency issue for Expo 54 users. (削除ここまで) (追記) fix(expo): Resolve Peer Dependency issue for Expo 54 users (追記ここまで) Jan 13, 2026
@chriscanin chriscanin merged commit 8c30314 into main Jan 13, 2026
103 of 109 checks passed
@chriscanin chriscanin deleted the chris/docs-11318-expo-quickstart-npm-install-clerkclerk-expo-requires-legacy branch January 13, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tmilewski tmilewski tmilewski approved these changes

@jacekradko jacekradko Awaiting requested review from jacekradko

Labels

bug Something isn't working core-3 expo sdk

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /