React-native-router-flux: Failed to build DependencyGraph: @providesModule naming collision:

Created on 22 Jul 2016  Â·  17Comments  Â·  Source: aksonov/react-native-router-flux

Duplicate module name: AutoFocusUtils
Paths: /home/sugeivan/react/SampleAppMovies/node_modules/react-native-router-flux/node_modules/react-native-experimental-navigation/node_modules/react/lib/AutoFocusUtils.js collides with /home/sugeivan/react/SampleAppMovies/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: /home/sugeivan/react/SampleAppMovies/node_modules/react-native-router-flux/node_modules/react-native-experimental-navigation/node_modules/react/lib/AutoFocusUtils.js collides with /home/sugeivan/react/SampleAppMovies/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 (/home/sugeivan/react/SampleAppMovies/node_modules/react-native/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:162:15)
at /home/sugeivan/react/SampleAppMovies/node_modules/react-native/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:127:25

bug needs response from author

Most helpful comment

I had this problem today, and I downgraded react-native-router-flux one version. Then it suddenly worked. But I believe that its not the router flux library that is the problem, but some NPM stuff. But you could try to downgrade that, or some random library to see if my thoughts are correct.

All 17 comments

Remove node-modules and run install again.

Any fixes for this? I didn't get this error until installing xCode 8 - that's when everything went bad

This happened to me when I installed with Yarn but not with NPM.

Same when using Yarn, works fine with npm

Occurs randomly in my case, npm, Xcode 8.

@aksonov this is happening because your npm package accidentally includes it's own internal node_modules directory. I ran into this problem when I was trying to fork react-native-experimental-navigation and use my own version.

Can you please setup the files directive in your package.json to only include the necessary files, and then push a new package to npm? Thanks!

Could you submit PR?

On 19 Feb 2017, at 13:25, Nathan Broadbent notifications@github.com wrote:

@aksonov https://github.com/aksonov this is happening because your npm package accidentally includes it's own internal node_modules directory. I ran into this problem when I was trying to fork react-native-experimental-navigation and use my own version.

Can you please setup the files directive in your package.json to only include the necessary files, and then push a new package to npm? Thanks!

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/aksonov/react-native-router-flux/issues/960#issuecomment-280915767, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQpcQoGPz-tBSc0Z0lhNXMNrRQvO6aoks5reDS2gaJpZM4JSpsH.

@aksonov Sorry ignore me! The npm packages are fine, I think I was just running into a weird bug with yarn. You're right, you just need to remove node_modules and reinstall.

I had this problem today, and I downgraded react-native-router-flux one version. Then it suddenly worked. But I believe that its not the router flux library that is the problem, but some NPM stuff. But you could try to downgrade that, or some random library to see if my thoughts are correct.

To solve this problem I had to explicitly state the version
"react-native-router-flux": "3.38.0",

If you do:
"react-native-router-flux": "^3.38.0",
Then the later version with the 127 phantomChildren libraries will be used instead and break building. Corporate sabotage?

Corporate sabotage? It sounds more like the regular "copy and paste without knowing what I am doing" as usual stuff instead of locking versions in the right way. ;-)

@daviscabral I disagree. Plus I have evidence to show the package.json files of older versions of npm libraries may have been modified in such a way that they break continuous integrations like appcenter. You don't seem to be actually debating me, or you seem to be confused, so I suggest you ask me for clarification, if that's what you need. Bad attitude isn't going to help this current widespread problem.

Alright - show me both things - where my joke shows bad attitude and where is our sabotage here. Thank you.

@clevertree Why do you spam closed issues? It is open source project, your 'corporation' didn't do anything to help. Why you can't just create detailed ticket with exact errors you got instead of spamming several tickets with the same 'corporate sabotage' abuse.

@aksonov I posted a solution to an actual problem that has not been solved, even if the thread is closed. Instead of helping @daviscabral attack me, you could point me at an already open ticket which suggests this solution, as I have found none. If there is none, then I would suggest you leave my solution here, so that other people who found this problem and can't upgrade to @4 can use it. Is that not protocol?

@daviscabral if your "not knowing what I'm doing" insult was only meant as a joke, then that's fine. Hard to tell in text FYI. Also this matter happens to be the last straw for many in the RN network. I'll give you the evidence, since you asked. Not expecting much given aksonov's response.

169packages.txt

package.json.txt

$ npm install
$ npm install [email protected] #fixes
$ npm install react-native-router-flux@^3.37.0 #breaks again
$ ls node_modules/react-native-router-flux/node_modules/

Essentially 3.44.1 adds 169 packages including a 'react' folder which can break many automated continuous integration setups like appcenter. The solution I provided gets past this problem.

@clevertree v3 is not supported for a long time so I'm just merging community commits and publish new v3 versions by community requests. Now I see that 3.42 introduced react/react-native dependencies and that is probably the reason of YOUR issues and probably connected with some specific npm version on YOUR side, because my yarn works well even with your package.json. Please check 3.45.0 version I made personally for you. Nobody else notified and complained about your particular issue.

P.S. I like npm as dependency for your "app"... It looks like real "corporate sabotage", right?

Anyway,it doesn't have anything with original issue (did you ever checked date of this post and compare to date of 3.37 version??) or other issue you spammed to. It is not good and should not happen again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sreejithr picture sreejithr  Â·  3Comments

fgrs picture fgrs  Â·  3Comments

GCour picture GCour  Â·  3Comments

willmcclellan picture willmcclellan  Â·  3Comments

maphongba008 picture maphongba008  Â·  3Comments