-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Naming collision detected" on start #5180
Comments
Hey siuying, thanks for reporting this issue! React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
|
I am running into the same problem |
I solved this issue by erasing fbjs from react native's node_modules folder. |
I ran into this same issue when updating from react-redux 3 to 4. I tried @fsp's solution but it didn't fix it. I ended up blowing up the whole I'm using 0.18-rc (but I've switched between 0.18-rc, 0.17 and |
Happens on |
Having the exact same issue with the fbjs package. Removing it manually did not fix it for me, because a conflict still exists but then in the node_modules/fbemitter directory. |
I am also having this issue and none of the above solutions worked at all, even with
I had to start from a complete new project. |
Try upgrading to npm@3. Does it work then (after deleting node_modules and npm installing again)? |
I'm also running into a similar naming collision error when trying to upgrade to 0.18.1. Mine shows as follows: [10:33:06 AM] <END> Crawling File System (1352ms)
[10:33:06 AM] <START> Building in-memory fs for JavaScript
[10:33:06 AM] <END> Building in-memory fs for JavaScript (335ms)
[10:33:06 AM] <START> Building in-memory fs for Assets
[10:33:06 AM] <END> Building in-memory fs for Assets (310ms)
[10:33:06 AM] <START> Building Haste Map
[10:33:07 AM] <START> Building (deprecated) Asset Map
[10:33:07 AM] <END> Building (deprecated) Asset Map (159ms)
Error building DependencyGraph:
Error: Naming collision detected: /Users/jason.merino/Code/MyApp/node_modules/fbjs/flow/include/warning.js collides with /Users/jason.merino/Code/MyApp/node_modules/fbemitter/node_modules/fbjs/lib/warning.js
at HasteMap._updateHasteMap (HasteMap.js:132:13)
at HasteMap.js:103:28
at tryCallOne (/Users/jason.merino/Code/MyApp/node_modules/promise/lib/core.js:37:12)
at /Users/jason.merino/Code/MyApp/node_modules/promise/lib/core.js:123:15
at flush (/Users/jason.merino/Code/MyApp/node_modules/asap/raw.js:50:29)
at nextTickCallbackWith0Args (node.js:452:9)
at process._tickCallback (node.js:381:13) I have done the following and it still shows up:
Here's my current setup npm 3.3.12 |
Ok yeah @jasonmerino probably the version of fbjs that "fbemitter" wants doesn't match the version that react-native requires, so even npm3 installs it twice. This is a problem we need to get solved. |
Thanks @corbt! Yeah, I was thinking that was odd that npm3 still had some nested dependencies, but a version mismatch makes sense. |
Same problem here on: Error: Naming collision detected: /Users/master/Pomodoro/node_modules/reactfire/node_modules/react/lib/BeforeInputEventPlugin.js collides with /Users/master/Pomodoro/node_modules/react/lib/BeforeInputEventPlugin.js After deleting the BeforeInputEventPlugin from "node_modules/reactfire/" dir I get Error: Naming collision detected: /Users/master/Pomodoro/node_modules/reactfire/node_modules/react/lib/CSSCore.js collides with /Users/master/Pomodoro/node_modules/fbjs/lib/CSSCore.js |
@fsp thanks! I was able to fix this by removing the fbjs directory. I hope there is a proper solution soon. |
Still having the same issue either using npm2 or npm3 |
I'm getting a new error in my project after installing Error building DependencyGraph:
Error: Naming collision detected: /Users/jason.merino/Code/MyApp/node_modules/babel-preset-react-native/node_modules/react-transform-hmr/package.json collides with /Users/jason.merino/Code/MyApp/node_modules/react-native/node_modules/react-transform-hmr/package.json
at HasteMap._updateHasteMap (HasteMap.js:132:13)
at HasteMap.js:112:32
at tryCallOne (/Users/jason.merino/Code/MyApp/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
at /Users/jason.merino/Code/MyApp/node_modules/react-native/node_modules/promise/lib/core.js:123:15
at flush (/Users/jason.merino/Code/MyApp/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
at doNTCallback0 (node.js:417:9)
at process._tickCallback (node.js:346:13) |
Getting the same error over here as well. Looks like Error: Naming collision detected:
node_modules/fbemitter/node_modules/fbjs/lib/warning.js
collides with
node_modules/react-native/node_modules/fbjs/lib/warning.js This seems.... avoidable. I'm new to React and React Native (and npm actually), any ideas? Thanks. |
@joshuapinter The consensus seems to be adding a This also assumes that you have installed |
i'm using react-native |
By the way, what's with 0.19.0? Last I checked it was an official release and all of a sudden it's back to 0.18.0? |
@jasonmerino Thanks for the advice. I created the postinstall script and did a fresh npm install. Now I'm getting this: Error: Naming collision detected:
node_modules/fbjs/flow/include/toArray.js
collides with
node_modules/fbjs/lib/toArray.js Any ideas? Many Thanks! |
Does anyone know if downgrading to react-redux 3.1.2 and using react native 18 still works? |
@ericmasiello, yes it works, I had to do that. |
Having the same issue over in dancormier/react-native-swipeout#65 |
@joshuapinter What worked for me (react native 0.19, npm 3.6.0) was to pin fbjs to 0.6.1 and ensuring that only the top level fbjs was present (following #5467) npm uninstall fbjs
npm install fbjs@0.6.1
find . -name 'fbjs' -print (delete all fbjs directories except the one at the top level) Hope this helps. I really love React Native, but upgrades are certainly not good for the hairline :-) |
Voila! Thanks @arunabha! I see this with Rails and Bundler from time to time but I didn't expect it with only a few modules in the package. |
Check here to solve this issue. 👏👍😃 |
@iTonyYo It doesn't work for me. my npm version is 3.3.12; my react-native is 0.20.0. I try |
Run your packager with a
|
It isn't just fbjs that is throwing the error, its also react Running |
@license2e can you please write a step by step solution? (& specify versions, etc...) |
Thanks to everyone for the suggested fixes provided in this thread. As of the upcoming 0.22 release, fbjs and react are consumed from npm, not vendored, so most of these issues should go away. Please give 0.22.0-rc4 a try! To keep issues focused on current bugs, we're closing this issue. Feel free to continue the discussion here for earlier versions, or reopen should this issue come back using 0.22.0. Thanks! |
getting same error. Error building DependencyGraph: |
Found a "Naming collision detected" on launch, where a fbjs file is collides with another fbjs files ...
The text was updated successfully, but these errors were encountered: