React-native-router-flux: EventPluginUtils.getLowestCommonAncestor not a function error

Created on 8 May 2017  路  10Comments  路  Source: aksonov/react-native-router-flux

Version

Tell us which versions you are using:

  • react-native-router-flux '^3.38.0'
  • react-native v0.44.0

Expected behaviour

Before upgrading to latest react-native v0.44.0, our react-native app was working fine in terms of all the Router functionalities, navigating between Scenes and having the navBar functioning correctly, etc.

Actual behaviour

Click on any component of any view is giving the following error:

screen shot 2017-05-07 at 9 59 20 pm

Steps to reproduce

Click on any component or try navigating to another scene.

Most helpful comment

Just fix the problem by upgrading dependency of react-native-router-flux in package.json
With

  "dependencies": {
    "lodash.isequal": "^4.5.0",
    "react": "^16.0.0-alpha.12",
    "react-addons-pure-render-mixin": "^15.4.2",
    "react-dom": "^15.4.2",
    "react-native": "^0.44.0",
    "react-native-experimental-navigation": "0.26.x",
    "react-native-tabs": "^1.0.9",
    "react-static-container": "1.0.1"
  },

And I do a npm install in the ./node_modules/react-native-router-flux folder.

All 10 comments

I have the same exception, the error append when I slide up or down on the screen/simulator.

  • react-native-router-flux 3.38.1
  • react-native v0.44.0

Same here

.....
"native-base": "^2.1.3",
"react": "16.0.0-alpha.6",
"react-dom": "^15.5.4",
"react-native": "0.44.0",
"react-native-router-flux": "^3.38.1",
"react-native-simple-store": "^1.2.0",
"react-native-vector-icons": "^4.1.1",
....

Same here.

  • react-native-router-flux 3.38.0
  • react-native v0.44.0

same here

"react": "16.0.0-alpha.6",
"react-native": "0.44.0",
"react-native-router-flux": "^3.38.0",

Just found that this function was removed on Feb 14 in react-native. here

And the function was moved to another class .

Just fix the problem by upgrading dependency of react-native-router-flux in package.json
With

  "dependencies": {
    "lodash.isequal": "^4.5.0",
    "react": "^16.0.0-alpha.12",
    "react-addons-pure-render-mixin": "^15.4.2",
    "react-dom": "^15.4.2",
    "react-native": "^0.44.0",
    "react-native-experimental-navigation": "0.26.x",
    "react-native-tabs": "^1.0.9",
    "react-static-container": "1.0.1"
  },

And I do a npm install in the ./node_modules/react-native-router-flux folder.

Thanks for the responses.

@danibal I tried to do what you suggested and updated package.json dependencies under ./node_modules/react-native-router-flux however I am getting new errors when I start up my app.

When I run 'react-native run-ios', I get a bunch of warnings such as the following:

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
Duplicate module name: react-native
Paths: /Users/user/Development/myApp/node_modules/react-native-router-flux/node_modules/react-native/package.json collides with /Users/user/Development/myApp/node_modules/react-native/package.json

Eventually I get this error:

This warning is caused by a @providesModule declaration with the same name across two different files.
Loading dependency graph, done.
error: bundling: Error: ENOENT: no such file or directory, open '/Users/user/Development/myApp/node_modules/react-native-router-flux/node_modules/react-native/Libraries/Utilities/BackAndroid.ios.js'
at Error (native)
at Object.fs.openSync (fs.js:634:18)
at Object.fs.readFileSync (fs.js:502:33)
at Module._readSourceCode (/Users/user/Development/myApp/node_modules/react-native/packager/src/node-haste/Module.js:200:29)
at Module._getCacheProps (/Users/user/Development/myApp/node_modules/react-native/packager/src/node-haste/Module.js:420:29)
at Module._readFromTransformCache (/Users/user/Development/myApp/node_modules/react-native/packager/src/node-haste/Module.js:376:29)
at Module.readCached (/Users/user/Development/myApp/node_modules/react-native/packager/src/node-haste/Module.js:363:25)
at Promise.resolve.then (/Users/user/Development/myApp/node_modules/react-native/packager/src/node-haste/DependencyGraph/ResolutionRequest.js:167:29)
at process._tickCallback (internal/process/next_tick.js:103:7)
Bundling index.ios.js 99.6% (541/542), failed.
Error: ENOENT: no such file or directory, open '/Users/user/Development/myApp/node_modules/react-native-router-flux/node_modules/react-native/Libraries/Utilities/BackAndroid.ios.js'
at Error (native)
at Object.fs.openSync (fs.js:634:18)
at Object.fs.readFileSync (fs.js:502:33)
at Module._readSourceCode (/Users/user/Development/myApp/node_modules/react-native/packager/src/node-haste/Module.js:200:29)
at Module._getCacheProps (/Users/user/Development/myApp/node_modules/react-native/packager/src/node-haste/Module.js:420:29)
at Module._readFromTransformCache (/Users/user/Development/myApp/node_modules/react-native/packager/src/node-haste/Module.js:376:29)
at Module.readCached (/Users/user/Development/myApp/node_modules/react-native/packager/src/node-haste/Module.js:363:25)
at Promise.resolve.then (/Users/user/Development/myApp/node_modules/react-native/packager/src/node-haste/DependencyGraph/ResolutionRequest.js:167:29)
at process._tickCallback (internal/process/next_tick.js:103:7)

@rzhaider86 It's because BackAndroid is deprecated in react-native 0.44.

Check in your code if you use BackAndroid.
To remove it from react-native-router-flux you can check the fork I did the last two commit will remove any reference to BackAndroid.

Thanks a lot @danibal for your responses.

I got it to work. I had to reboot my laptop and it solved the problem i was having. Maybe I needed to clear the cache for my ios simulator?

@danibal did you submit a PR for your fix?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

booboothefool picture booboothefool  路  3Comments

sarovin picture sarovin  路  3Comments

fgrs picture fgrs  路  3Comments

moaxaca picture moaxaca  路  3Comments

basdvries picture basdvries  路  3Comments