react-native: RN 0.43 upgrade error ReactComponentWithPureRenderMixin
Description
error: bundling: UnableToResolveError: Unable to resolve module react/lib/ReactComponentWithPureRenderMixin
from C:\project\node_modules\react-addons-pure-render-mixin\index.js
: Module does not exist in the module map or in these directories:
C:\project\node_modules\react\lib
Reproduction Steps and Sample Code
After Upgrade from 0.42 to 0.43 we receive the following error. Requested file does not exist on node_modules. We have clear node_modules and run “npm install” We are using “react”: “16.0.0-alpha.6”
Additional Information
- React Native version: 0.43
- Platform: Android
- Development Operating System: Windows
- Dev tools: -
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 7
- Comments: 26 (7 by maintainers)
Commits related to this issue
- React sync for revisions bc1ea9c...ade5e69 Summary: This sync includes the following changes: - **[ade5e6928](https://github.com/facebook/react/commit/ade5e6928)**: Manually update schedule dep in re... — committed to facebook/react-native by yungsters 6 years ago
- React sync for revisions bc1ea9c...ade5e69 Summary: This sync includes the following changes: - **[ade5e6928](https://github.com/facebook/react/commit/ade5e6928)**: Manually update schedule dep in re... — committed to facebook/react-native by yungsters 6 years ago
- React sync for revisions bc1ea9c...ade5e69 Summary: This sync includes the following changes: - **[ade5e6928](https://github.com/facebook/react/commit/ade5e6928)**: Manually update schedule dep in re... — committed to gengjiawen/react-native by yungsters 6 years ago
- React sync for revisions bc1ea9c...ade5e69 Summary: This sync includes the following changes: - **[ade5e6928](https://github.com/facebook/react/commit/ade5e6928)**: Manually update schedule dep in re... — committed to aleclarson/react-native by yungsters 6 years ago
It seems that “react-native-router-flux” cause the problem to me because it has dependency with “react-addons-pure-render-mixin”
@itinance have you tried with
"react": "16.0.0.-alpha.3"
instead of"react": "16.0.0.-alpha.9"
?@ITsolution-git This setup is currently working for me.
"react": "16.0.0", "react-native": "0.51.0", "react-native-router-flux": "3.43.0"
When you upgrade,it will upgrade react version too.now it is using react version 16.alpha. in 16 there is no pure-render-mixin.so you need to install it through npm.or you have to downgrade react version into 15.x.
Install these will fix the issue.
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we’re automatically closing issues after a period of inactivity. Please do not take it personally!
If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.
The issue was in our cases, that
ReactComponentWithPureRenderMixin
is required for instance by “react-addons-pure-render-mixin
” this way:module.exports = require('react/lib/ReactComponentWithPureRenderMixin');
But the path “node_modules/react/lib” was removed from 0.43.
react-addons-pure-render-mixin
gots never being fixed for that.react-native-router-flux V3 is based on react-native-navigation-experimental that will require itself the
react-addons-pure-render-mixin
wwhich requires theReactComponentWithPureRenderMixin
that is gone.Unfortunately the react-native-router-flux goes deprecated recently while the V4-successor is still in beta and not working as a sucessor in all of our apps due to lag of backward compatibility and a lag of documentation (regarding Drawer for instance) or the approach to call scenes on actions like
Actions.main()
.some sources:
@Chathula This helps one step ahead, thx 😃
And continues then with bundling: UnableToResolveError: Unable to resolve module
react/lib/ReactComponentTreeHook
from “/node_modules/react-native/Libraries/Performance/Systrace.js”https://medium.com/@dan_abramov/mixins-are-dead-long-live-higher-order-components-94a0d2f9e750
I have solved the issue Just changing
"react-native-router-flux": "3.43.0"
from above package.jsonFound the issue from the react-native-router-flux. Thanks.