-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Naming collision: flux/node_modules/fbjs/flow/include/ErrorUtils.js #5390
Comments
Hey sethx, 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.
|
@SEthX npm3 is not officially recommended yet. Till then can you try removing fbjs from any nested dep and installing it under Here are few steps for anyone else having the same problem:
|
I had similar issue, for me helped upgrading to Node 5.0.2 and npm 3.3.12 |
I had a similar issue with naming collisions in fbjs, but in different files. The steps that @chirag04 posted fixed it for me. |
I had a fbjs camelize.js clash but the @chirag04 instructions plus restarting xcode and the iOS simulator to completely clear caches |
@chirag04 fix worked for me as well, thanks! |
This fix worked great, thank you. |
The fix didn't work for me. The fbjs in npm is different to the ones used by react-native. The version of lib/invariant.js in the package now doesn't have |
As an extension to the answer by @chirag04, you can add a npm post install script with this line to automatically take care of the problem whenever
|
I found it easier to just tell the packager to ignore all versions of fbjs other than the one you install. So, install your version of fbjs (I found v.0.6 to only work):
And then create a rn-cli.config.js file in your root. This worked for me: var blacklist= require("react-native/packager/blacklist");
var config = {
getBlacklistRE(platform) {
return blacklist(platform,[/MYAPPNAME.+\/node_modules\/fbjs.*/]);
}
}
module.exports = config; Replacing MYAPPNAME with your app's directory name (remember to escape out any regex chars, like |
@joewood's solution worked for me. thanks! |
@chirag04 solution worked for me (Node v5.5.0 & npm 3.3.12 & RN18) |
I'm having the same issue and after doing the steeps above I have this error... Any thoughts ? |
@ghamaide which version of fbjs did you install? This error looks like a conflict within fbjs and its local flow install. Try fbjs@0.6.0 |
@joewood What exactly is MYAPPNAME? Is this the name in package.json? |
Just the root directory of your app. The blacklist logic in the packager is matching the full pathname, so it includes your root dir. |
That seems to fix the conflict issue when the packager is running, but I get errors when my app actually runs. The error I get is:
I have installed fbjs@0.6.0, I'm using npm version 2.14.7 and node v4.2.0 and react-native 0.19.0 If I do npm install invariant, I end up getting: I haven't found a way to fix the conflicts between fbjs in flux and react-native, got any other ideas? |
@joewood what version of NPM are you using? |
I'm on npm 2.14.16, node 4.2.3 and RN 0.18.1
You may need to package with a |
@joewood Thanks.. worked for me! #twoDaysTryingToFigureThisOut |
@alex-mcleod solution worked for me. Thanks |
Neither of the provided solutions worked for me. I am on npm 3.3.12 and node 5.3.0
error is Any ideas ? |
@joewood the blacklist worked for me! |
I also faced this issue but in different file Failed to build DependencyGraph: Naming collision detected: /home/samantha/Projects/prepaid-portal/m1-prepaid-portal-web/node_modules/fbjs/flow/include/fetch.js collides with /home/samantha/Projects/prepaid-portal/m1-prepaid-portal-web/node_modules/react-native/Libraries/Fetch/fetch.js |
having this issue with RN v0.20 |
My solution is always to delete the: On Sat, Feb 27, 2016 at 4:25 PM Lukas Liesis notifications@github.com
|
+1 to @SEthX. Works for me as well. It is weird that i always get this issue as soon as i install anything with npm. After that just delete the mentioned folder and everything should be fine |
@BigPun86 folder appears again because npm installs it again. That's why it's bad solution. You should not touch anything inside node_modules folder. |
I have a mix of this bug and flux and #4968 , and my workaround for now is:
|
@joewood 's solutions worked |
tried a million things.. installing |
Solution that worked for me as of 0.21.0:
|
Hello,
After upgrading to 0.18.0 and rebuilding my project from scratch (Deleting all files, generating a new project via react-native init, redowloading only source from version control, recreating the node_modules folder from scratch) i get this:
Error building DependencyGraph:
Error: Naming collision detected: /Users/d/Desktop/project/node_modules/flux/node_modules/fbjs/flow/include/ErrorUtils.js collides with /Users/d/Desktop/project/node_modules/react-native/Libraries/Utilities/ErrorUtils.js
My environment:
npm 3.5.1
node v4.1.1
lastest react-native-cli tools
OSX
My package.json's dependencies:
"fbemitter": "^2.0.0",
"flux": "^2.1.1",
"react-native": "0.18.0",
"react-native-swipeout": "^2.0.11",
"react-mixin": "^3.0.0",
"gb-native-router": "^0.6.0",
"react-native-item-cell": "^1.3.0",
"react-native-linear-gradient": "v1.3.0"
The text was updated successfully, but these errors were encountered: