-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix: add react-dom as peer dependency #3786
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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. Latest deployment of this branch, based on commit 4e78c7c:
|
94e0e8b
to
6a29134
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. I guess we need react-native
as well then, because we have both react-dom
and react-native
marked as optional
in peerDependenciesMeta
, right ?
Yeah, that's right. I can add it to the PR, but I'm not sure what the version selector should be? |
yeah me neither. @arnaudbzn might know, or @hirbod ? |
Depends. Expo users need 0.68.2, while RN is available at 0.69.1. |
@hirbod can we just do |
It's hard to say. I think folks might end up with the need to add a yarn resolution when different versions being installed. Potentially, there could still be plenty of 0.64.3 users as well (SDK 44) I think that * might be the correct way. Irc, @satya164 was tweeting about peer dep issues a while ago. He might know the correct answer. |
are optional peer dependencies also installed automatically ? I didn't think so, but not sure 🤔 |
see: https://docs.npmjs.com/cli/v7/configuring-npm/package-json#peerdependenciesmeta
|
Yeah, that was something similar he was tweeting. Most people did the mistake to add it as devDependency, instead of peer. Adding * should be fine. All expo modules packages I know also add expo as *. |
thanks. @duarten then let's do |
Done! |
Keep in mind that adding I'd suggest not adding this peer dep. I haven't used |
sorry @satya164 I just saw your comment right now. I was under the impression that since the dependencies are marked as |
@TkDodo ah I right, I hadn't checked the full file, yes that should be fine then. |
Seems like I would suggest It's also worth noting that this is preventing us from setting |
If missing, then strict package managers like pnpm will not link this
react-dom in, causing react-query to fail at runtime cause it can't load
react-dom.
Fixes #3534