goatslacker / alt

Isomorphic flux implementation
http://alt.js.org/
3.45k stars 323 forks source link

problem installing alt with react-native 0.20-rc #622

Closed vladp closed 8 years ago

vladp commented 8 years ago

Hello, I cannot seem to successfully install Alt (npm installs it,but then I get the below error when doing react-native-start

I had tried independently including fbemitter, and also tried moving the alt and fbemitter before or after react-native depedency in package.json. That did not help.

    "dependencies": {
    "fbemitter":"^2.0.2",
    "alt":"^0.18.2",

    "react-native": "0.20.0-rc1",

    "@remobile/react-native-splashscreen": "^1.0.3",

    "react-native-blur": "^0.7.6",
    "react-native-htmlview": "^0.2.0",

    "react-native-action-button": "^1.1.2",
    "react-native-android-statusbar": "^0.1.2",
    "react-native-material-kit": "^0.3.0", 
    "react-native-material-design": "^0.3.2"

    }

error:

Failed to build DependencyGraph: Naming collision detected: /home/node_modules/flux/node_modules/fbjs/lib/emptyFunction.js collides with /home/node_modules/fbjs/lib/emptyFunction.js Error: Naming collision detected: /home/node_modules/flux/node_modules/fbjs/lib/emptyFunction.js collides with /home/node_modules/fbjs/lib/emptyFunction.js at HasteMap._updateHasteMap (HasteMap.js:132:13) at HasteMap.js:103:28 at tryCallOne (/home/node_modules/promise/lib/core.js:37:12) at /home/node_modules/promise/lib/core.js:123:15 at flush (/home/node_modules/asap/raw.js:50:29) at nextTickCallbackWith0Args (node.js:452:9) at process._tickCallback (node.js:381:13)

devel@ubuntu: ~> npm -version 3.7.3 devel@ubuntu: ~> nodejs --version v5.6.0

thx in advance for any help

valecassani commented 8 years ago

+1 I have the same problem with a naming collision with React Native >= 0.18 due to the fbjs package.

dubbelnisse commented 8 years ago

+1 same problem

goatslacker commented 8 years ago

It seems like you can just npm install fbjs and reuse that package.

vladp commented 8 years ago

suggestion to install fbjs is not working for me

rm -rf node_modules/
npm install --no-shrinkwrap
react-native start
Failed to build DependencyGraph: Naming collision detected: /home/node_modules/flux/node_modules/fbjs/flow/include/getActiveElement.js collides with /home/node_modules/react-native/node_modules/fbjs/lib/getActiveElement.js
Error: Naming collision detected: /home/node_modules/flux/node_modules/fbjs/flow/include/getActiveElement.js collides with /home//node_modules/react-native/node_modules/fbjs/lib/getActiveElement.js

"dependencies": {

    "fbjs":"^0.7.2",
    "alt": "^0.18.2",

    "react-native": "0.20.0-rc1",

    "@remobile/react-native-splashscreen": "^1.0.3",

    "react-native-blur": "^0.7.6",
    "react-native-htmlview": "^0.2.0",

    "react-native-material-kit": "^0.3.0", 
    "react-native-material-design": "^0.3.2"
    }
crockpotveggies commented 8 years ago

Solution suggested also does not work for our team. +1

valecassani commented 8 years ago

I solved the issue by adding the module "fbjs" at the version 0.6.1 in dependencies and removing with a postinstall script the folder "node_modules/flux/node_modules" (I don't know why but there is a very old alpha version dependency). If you want I can upload my package.json file and the postinstall script.

vladp commented 8 years ago

@valecassani the above suggestion (to use fjbjs 0.6.1) did not work for me either, got the same error as when using fbjs 0.7.2.

vladp commented 8 years ago

@valecassani I had not followed your complete suggestion, and left the flux's copy of fbjs in. I think you had nailed the problem. I checked and flux has this issue reported. However they do not plan to address it, instead suggested to wait for next release of react-native that supposedly would allow multiple copies of fbjs to coexist..

It is not an issue with alt.

https://github.com/facebook/flux/issues/329

ufon commented 8 years ago

+1 help please!

fxhereng commented 8 years ago

+1 Same problem here