Closed juliuslissau closed 2 months ago
Hi, thanks for the issue!
The error message is already telling you what's wrong:
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.3.1" from react-dom@18.3.1
npm ERR! node_modules/react-dom
npm ERR! peer react-dom@">=18" from @clerk/clerk-expo@1.2.6
Your project is missing the dependency react-dom
. It's defined as a peerDependency (read: I needs to be installed) here:
https://github.com/clerk/javascript/blob/944bb2e23ccd6187bf1ad623b48629e8c2b71442/packages/expo/package.json#L64
Thanks for clarifying a bit more
I already tried install react-dom, just doing npm i react-dom
gives the same error.
Then running npm i react-dom@18.2.0
allows installing react-dom, but then the error with clerk persists which I didn't understand.
Now after your comment assuring it was related to react-dom, I tried npx expo install react-dom
and npx expo install @clerk/clerk-expo
which then made everything fit together. Thanks and sorry about the confusion :)
You might wanna add this to your documentation though. Seems like an good thing to have in the beginning of this article.
Glad that you got it to work 👍
Our quickstart links to https://docs.expo.dev/tutorial/create-your-first-app/ in the "Before you start" section and they have this step: https://docs.expo.dev/tutorial/create-your-first-app/#install-dependencies
I think that should cover it 😊 Support for Expo Web is also coming soon!
I resolved it by changing "react-dom": "^18.2.0" to "react-dom": "18.2.0"
Preliminary Checks
[X] I have reviewed the documentation: https://clerk.com/docs
[X] I have searched for existing issues: https://github.com/clerk/javascript/issues
[X] I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
[X] This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
https://github.com/juliuslissau/test-app
Publishable key
unnecessary
Description
Steps to reproduce:
npx create-expo-app@latest test-app --template blank
npm install @clerk/clerk-expo
Expected behavior: @clerk/clerk-expo should install.
Actual behavior:
Note: It somehow works if you run
npx create-expo-app@latest test-app
without--template blank
, but I don't understand why and it just installs a lot of web related packages which it seems Clerk doesn't support anyway (Currently the @clerk/expo SDK only supports mobile app output. - https://clerk.com/docs/quickstarts/expo)Environment