Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Description
When my project upgrade to React Native 0.43,hint errors as follow:
├── UNMET PEER DEPENDENCY react@15.4.2
├── react-addons-pure-render-mixin@15.4.2
├── react-native@0.43.0
├── react-native-extended-stylesheet@0.3.2
└── react-native-scrollable-tab-view@0.6.0
npm ERR! peer dep missing: react@16.0.0-alpha.6, required by react-native@0.43.0
npm ERR! peer dep missing: react@^15.5.0, required by react-addons-shallow-compare@15.5.0-alpha.0
How to resolve it?
Reproduction Steps and Sample Code
I use npm install --save react-native@0.43 to upgrade React Native
Additional Information
- React Native version: 0.43
- Platform: Android
- Development Operating System: MacOS
- Dev tools: Android Studio 2.2.3
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Activity
ide commentedon Apr 5, 2017
You need to install
react@16.0.0-alpha.6. You can safely ignore the warning aboutreact-addons-shallow-compare@15.5.0-alpha.0, it is harmless and will be fixed in 0.43.1.(cc @grabbou, I merged a commit to 0.43-stable that removes react-addons-shallow-compare [unused] from package.json)
grabbou commentedon Apr 5, 2017
Jazz747 commentedon Apr 5, 2017
I'm having the same issue with react-native-maps@0.14.0 (latest)
react-native-maps@0.14.0 requires a peer of react@>=15.4.0 but none was installed.
react@16.0.0-alpha.6 installed
kelset commentedon Apr 5, 2017
So 0.43 is already running Fiber?
(react@16 = fiber right?)
npomfret commentedon Apr 5, 2017
43.1 failed for me with: Unable to resolve module
react/lib/shallowCompareSudoPlz commentedon Apr 5, 2017
I get
UNMET PEER DEPENDENCY react@16.0.0-alpha.6even though react@16.0.0-alpha.6 is installed.MarsHuang123 commentedon Apr 6, 2017
I also met this issue, 'UNMET PEER DEPENDENCY react@16.0.0-alpha.6'
Lxxyx commentedon Apr 6, 2017
@npomfret Got same issue. Do you fixed?
jinlong commentedon Apr 6, 2017
Thanks !
As @ide say, i installed
react@16.0.0-alpha.6, then my project could run normally.Errors as follow are harmless, they will be fixed.
liftyourgame commentedon Apr 11, 2017
I get the same issue with react@16.0.0-alpha.6 installed
I even tried removing node_modules first and then installing react@16.0.0-alpha.6 first before running npm install
liftyourgame commentedon Apr 11, 2017
Upgrading npm seems to fix the issue:
npm install npm@latest -giroshanAV commentedon Apr 11, 2017
@liftyourgame yes, that solved my problem too :D
ericchuawc commentedon Apr 11, 2017
@liftyourgame his approach works for me too :) hooray
just i got a warning, not sure is there any side effect?
npm WARN react-test-renderer@15.4.2 requires a peer of react@^15.4.2 but none was installed.
hmm?
iroshanAV commentedon Apr 12, 2017
@ericchuawc surely that error has side effects, can you install it separately ?
11 remaining items
petersuwara commentedon Jun 1, 2017
@githubmss
Remove NPM, NODE, REACT-NATIVE-CLI.
NODE/NPM -> https://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x
Reinstall everything and create a new project.
https://facebook.github.io/react-native/docs/getting-started.html
Run react-native init testproj
Run react-native run-android
Does the fresh project work ?
githubmss commentedon Jun 1, 2017
@petersuwara , i am not very much familiar with the commands , will it be possible for you if you can type all those commands for me . when i run "brew info node" command from the link provided by you
it displays something like this :-
brew info node
petersuwara commentedon Jun 1, 2017
@githubmss you should look at ->
brew info npm
Suggest brew uninstall npm then find where your node_modules directory is and delete that.
githubmss commentedon Jun 1, 2017
i got something like this :-
brew info npm
petersuwara commentedon Jun 1, 2017
@githubmss please e-mail me on peter@realityworks.com.au I can help you there.
githubmss commentedon Jun 1, 2017
@petersuwara , i have mailed you , please let me know if you require any further information.Thanks for your support . Appreciate it!!!!
ahilton commentedon Jun 4, 2017
@githubmss, I had the same error [Cannot find module 'anymatch'] after upgrading from RN 0.41.2 to 0.44.1.
After re-installing NPM, NODE & REACT-NATIVE-CLI as per @petersuwara suggestion, I also had to delete 'package-lock.json' in the project directory in order to resolve. No idea why.
Kosai106 commentedon Jun 5, 2017
I've been getting the same issue as @githubmss after upgrading to NPM 5.0.2, but luckily, like @ahilton suggested, deleting package-lock.json and running
npm installagain solved it.fengerzh commentedon Jun 7, 2017
Just delete
package-lock.jsonsolved the problem. Don't worry, after you runnpm install,package-lock.jsonwill come back. I am not familiar withyarn, but I guess the file was generated byyarnto keep packages consistent.heckchuckman commentedon Jun 10, 2017
Confirming that deleting
package-lock.jsonand then runningnpm installclears the issue for me. Thanks!catyku commentedon Jun 23, 2017
I fixed with reinstall nodejs
choco install nodejs
sandeepeswar8 commentedon Jul 3, 2017
i have a problem react-native like
"""""" react-native run-android
Command
run-androidunrecognized. Make sure that you have runnpm installand that you are inside a react-native project."'''**ofter install npm like**
its shows
""""" npm install
npm WARN react-static-container@1.0.1 requires a peer of react@^0.13.0 || ^0.14.0 || ^15.0.0 but none was installed.
npm WARN react-test-renderer@16.0.0-alpha.12 requires a peer of react@^16.0.0-alpha.12 but none was installed.
removed 9 packages in 44.208s"""""
can you ples replay me how to solve this problem
andrewschreiber commentedon Jul 16, 2017
Removing
yarn.lockandpackage-lock.jsonthen runningyarnworked for me.