5

when I start development server using this command:

react-native start

then I am getting error this:

Error building DepdendencyGraph:

Error: Naming collision detected: /home/awesomepankaj/Work/lifemakerProjects/workingLifemaker/LifeMaker/node_modules/react-native/node_modules/react-tools/src/shared/vendor/core/dom/focusNode.js collides with /home/awesomepankaj/Work/lifemakerProjects/workingLifemaker/LifeMaker/node_modules/react-native-modalbox/node_modules/react-native/node_modules/react-tools/src/shared/vendor/core/dom/focusNode.js

react-native version 0.13

Ubuntu 14.04

5 Answers 5

12

If your are stuck up here.

It is a quick fix for now.

You can delete you react-native folder from node_module/react-native-router/node_module/react-native

Instead, you can use react-native from node_module/react-native.

3

It's probably because you have multiple /node_modules folders in one of your subfolders.

1
  • This one. I had a weird folder "t" in the root of my folder which was basically a copy of my node_modules folder.
    – mikpou
    Aug 3, 2016 at 6:58
2

If you have the directory path like this:

app/
  ios/
     Pods/
        React/
           node_modules/
  node_modules/
  src/
     index.ios.js
  package.json

Then you can just run

$ ./node_modules/react-native/packager/packager.sh --projectRoots `pwd`/src --projectRoots `pwd`/node_modules

More detail:

https://github.com/facebook/react-native/issues/3440

0
2

For those who still have this issue or might have it, I suggest you update npm to the latest version, which will flatten all the modules in the node_modules folder, therefore reducing the risks of duplicated packages.

-2

If you used CocoaPods,you should delete you react-native folder from node_module/react-native/node_module.

My CocoaPods version is 0.39.Node version is 5.3.0.React Native version is 0.14.2.

When I deleted react-native folder,It's works.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.