There appears to be a conflict with an inner module using it's own react. The error from the packager look like this:
Failed to build DependencyGraph: @providesModule naming collision:
Duplicate module name: AutoFocusUtils
Paths: /Work/FinanceReactNative/node_modules/react-native-router-flux/node_modules/react-native-experimental-navigation/node_modules/react/lib/AutoFocusUtils.js collides with /Work/FinanceReactNative/node_modules/react/lib/AutoFocusUtils.js
This error is caused by a @providesModule declaration with the same name accross two different files.
Error: @providesModule naming collision:
Duplicate module name: AutoFocusUtils
Paths: /Work/FinanceReactNative/node_modules/react-native-router-flux/node_modules/react-native-experimental-navigation/node_modules/react/lib/AutoFocusUtils.js collides with /Work/FinanceReactNative/node_modules/react/lib/AutoFocusUtils.js
This error is caused by a @providesModule declaration with the same name accross two different files.
at HasteMap._updateHasteMap (/Work/FinanceReactNative/node_modules/react-native/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:160:15)
at /Work/FinanceReactNative/node_modules/react-native/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:125:25
This is because react-native-router-flux ends up including a react copy itself.
My workaround for this was making a rn-cli.config.js file in the root of the project, with this code (adjust your regex as needed):
var blacklist = require('react-native/packager/blacklist');
var config = {
getBlacklistRE(platform) {
return blacklist(platform, [
/FinanceReactNative\/node_modules\/react-native-router-flux\/node_modules\/react-native-experimental-navigation\/node_modules\/react\/.*/
]);
}
};
module.exports = config;
Thanks for the outstanding demo app!
There appears to be a conflict with an inner module using it's own
react
. The error from the packager look like this:This is because
react-native-router-flux
ends up including areact
copy itself.My workaround for this was making a
rn-cli.config.js
file in the root of the project, with this code (adjust your regex as needed):More info on a similar issue here