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

Most upvoted comments

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.

"react-addons-pure-render-mixin": "^15.5.0",
"react-static-container": "^1.0.1",

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:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

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 the ReactComponentWithPureRenderMixin 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:

  1. https://github.com/aksonov/react-native-router-flux/issues/1974#issuecomment-316026221
  2. https://github.com/aksonov/react-native-router-flux/issues/2045

@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”

I have solved the issue Just changing "react-native-router-flux": "3.43.0" from above package.json

Found the issue from the react-native-router-flux. Thanks.