Skip to content

Conversation

@chriscanin
Copy link
Member

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 requested a review from tmilewski January 13, 2026 20:24
@chriscanin chriscanin self-assigned this Jan 13, 2026
@changeset-bot
Copy link

changeset-bot bot commented Jan 13, 2026

🦋 Changeset detected

Latest commit: cc9ada6

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

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

@vercel
Copy link

vercel bot commented Jan 13, 2026

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 8:25pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 13, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

@tmilewski tmilewski changed the title fix(expo): Resolve Peer Dependency issue for Expo 54 users fix(clerk-expo): Resolve Peer Dependency issue for Expo 54 users Jan 13, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 13, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7591

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7591

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7591

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7591

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7591

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7591

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@7591

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@7591

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7591

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7591

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7591

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7591

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7591

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7591

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@7591

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7591

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@7591

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7591

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7591

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7591

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@7591

@clerk/types

npm i https://pkg.pr.new/@clerk/types@7591

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7591

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7591

commit: cc9ada6

@chriscanin chriscanin merged commit f27f9bc into release/core-2 Jan 13, 2026
46 of 47 checks passed
@chriscanin chriscanin deleted the chris/docs-11318-expo-quickstart-npm-install-clerkclerk-expo-requires-legacy-core-2 branch January 13, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants