-
Notifications
You must be signed in to change notification settings - Fork 251
Native version requires react-dom #792
Comments
The only instance I could find is here: const findDOMNode = !isNative
? require('react-dom').findDOMNode
: null; Are you sure you can't use this without |
I upgrade my old project. At now packager say...
react-native@0.44.0 |
I'm also getting this error. If I'm interpreting the line correctly, it's saying "If it is web, require react-dom, if not, don't. I'll try replacing it with just findDOMNode = null. |
Yeah that worked. Had to restart Expo from scratch, but it worked. Literally just replace this line like this, it seems something is getting required when in needn't be:
|
I'll make a fix for that. |
I'm getting the same error as @alexesDev using react-redux-form@1.16.5 |
This still seems to be very much an issue. I got around it by commenting out It looks like pull request |
@nextriot would you be able to make a new PR for it? I can merge it in ASAP. |
@davidkpiano the changes that I've made would be destructive to the rest of the project (e.g. the web side). The issue seems to be the static analysis of 'require' statements. Just the fact that it's present in the control-component.js file is forcing the compiler to search for the component. It doesn't make a difference if the 'require' is made conditionally or not, the compiler will always do the lookup. The fastest way I can see around it is by having a separate control-component.js file for React Native use only. Alternatively, there may be a conditional require plugin for react that you could include as a dependency then use the 'require' statement as is with minimal tweaking. I don't know enough about the layout of the plugin yet to implement either fix however. Sorry. Let me know if there's anything else I can help with. If you want me to make the PR regardless of the above, just say the word. |
Having this issue too with version |
You can work around this: https://remarkablemark.org/blog/2017/02/25/webpack-ignore-module/ |
requires also react-dom... becouse imports some code from src/index.js what import dom-based control...
Version: react-redux-form@1.11.1
The text was updated successfully, but these errors were encountered: