-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Missing peer dependency on react-dom
#1424
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
Comments
That's unfortunate :/ but also understandable. Too bad package.json doesn't have some way to conditionally declare dependencies. Given amount if PRs and issues about this, what do you think about putting some context around that import in source code to guard against PRs and issues about this in the future? :) In any case - thanks for quick response! |
Heh. Yeah, a "DON'T MESS WITH THIS!" comment might not be a bad idea :) |
They do. It's |
This package import some utilities from
react-dom
:react-redux/src/utils/reactBatchedUpdates.js
Line 2 in 2297944
But
react-dom
is not specified as dependency or peerDependencyreact-redux/package.json
Lines 38 to 49 in 2297944
This cause
Cannot file module 'react-dom'
errors when using it with Ink (react for cli/terminal).Installing
react-dom
does fix the issue (bit weird to install it for terminal app, but what can you do :) ). Ifreact-dom
is being used, it should be either dependency (probably not the way here) or peerDependency so package managers warn about missing dependency before we run into issues like that.Issue discovered in gatsbyjs/gatsby#18603
The text was updated successfully, but these errors were encountered: