Skip to content
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 from react-native and react in fbjs\lib\CSSCore.js #5357

Closed
jjchula opened this issue Jan 16, 2016 · 10 comments
Closed

Naming collision from react-native and react in fbjs\lib\CSSCore.js #5357

jjchula opened this issue Jan 16, 2016 · 10 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@jjchula
Copy link

jjchula commented Jan 16, 2016

run "react-native start" for android and got this error

Error building DependencyGraph:
Error: Naming collision detected: D:\rx2\node_modules\react-native\node_modules\fbjs\lib\CSSCore.js collides with D:\rx2\node_modules\react\node_modules\fbjs\lib\CSSCore.js

Details
package dependencies
"react-native": "^0.18.0-rc",
"react": "^0.14.6",
"react-dom": "^0.14.6"

Environment
npm 2.14.15
react-native-cli 0.1.10
Windows 10

@facebook-github-bot
Copy link
Contributor

Hey jjchula, 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.

  • If you don't know how to do something or something is not working as you expect but not sure it's a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

@tomauty
Copy link

tomauty commented Jan 16, 2016

Try removing the react and react-dom dependencies, if you can. RN ships with it. Are you using npm3?

@josebalius
Copy link

Getting the same thing when upgrading from 0.17 - 0.18.0-rc

@satya164
Copy link
Contributor

Try deleting your node_modules folder and run npm install again.

@brentvatne
Copy link
Collaborator

Make sure you're using npm3 also!

edit: actually it seems that is not required currently, however it may solve this problem.

@jjchula
Copy link
Author

jjchula commented Jan 17, 2016

react v0.14.x has "fbjs" devDependency.
While v0.14 to v0.17 of react-native have no "fbjs" dependencies, v0.18.0-rc does.
So, with npm2, if the RN project also includes package with react peerDependency, Bang!

@josebalius
Copy link

Yeah, what @jjchula said. After deleting the node_modules folder, and run npm install again, i get:

[1:58:54 PM] <END>   Building (deprecated) Asset Map (1220ms)
Error building DependencyGraph:
 Error: Naming collision detected: /Users/josebalius/Sites/Ravedish/node_modules/react/node_modules/fbjs/lib/warning.js collides with /Users/josebalius/Sites/Ravedish/node_modules/react-native/node_modules/fbjs/lib/warning.js

With npm@2

@josebalius
Copy link

I tried it with npm@3 and ran into this issue: #4296 however #4296 (comment) seems to fix it for me.

@masom
Copy link

masom commented Jan 19, 2016

Fixed by forcing npm install -g npm@2.

EDIT: Nope, still broken with npm 2.

@brentvatne
Copy link
Collaborator

Moving discussion to #5357

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

8 participants