When my project upgrade to React Native 0.43οΌhint errors as follow:
βββ UNMET PEER DEPENDENCY [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
npm ERR! peer dep missing: [email protected], required by [email protected]
npm ERR! peer dep missing: react@^15.5.0, required by [email protected]
How to resolve it?
I use npm install --save [email protected] to upgrade React Native
You need to install [email protected]. You can safely ignore the warning about [email protected], 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)
Thanks, I'll be at work in a while and will pick it.
On Wed, Apr 5, 2017, 07:26 James Ide notifications@github.com wrote:
Closed #13309 https://github.com/facebook/react-native/issues/13309.
β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/issues/13309#event-1029720418,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACWcxuwGn62-6eJaIJI-ceezXbLm8L7yks5rsyYTgaJpZM4MzrFt
.
I'm having the same issue with [email protected] (latest)
[email protected] requires a peer of react@>=15.4.0 but none was installed.
[email protected] installed
So 0.43 is already running Fiber?
(react@16 = fiber right?)
43.1 failed for me with: Unable to resolve module react/lib/shallowCompare
I get UNMET PEER DEPENDENCY [email protected] even though [email protected] is installed.
I also met this issue, 'UNMET PEER DEPENDENCY [email protected]'
@npomfret Got same issue. Do you fixed?
Thanks !
As @ide say, i installed [email protected], then my project could run normally.
Errors as follow are harmless, they will be fixed.
npm ERR! peer dep missing: react@^15.5.0, required by [email protected]
npm ERR! peer dep missing: react@^0.13.0 || ^0.14.0 || ^15.0.0, required by [email protected]
I get the same issue with [email protected] installed
I even tried removing node_modules first and then installing [email protected] first before running npm install
Upgrading npm seems to fix the issue:
npm install npm@latest -g
@liftyourgame yes, that solved my problem too :D
@liftyourgame his approach works for me too :) hooray
just i got a warning, not sure is there any side effect?
npm WARN [email protected] requires a peer of react@^15.4.2 but none was installed.
hmm?
@ericchuawc surely that error has side effects, can you install it separately ?
@iroshanAV any tips how to solve this warning? as i am using the latest react 16 alpha due to react native 0.43.
Removed NPM, NODE, REACT-NATIVE-CLI and WATCHMAN. Reinstalled everything and created a new project. Now it seems to work.
@ericchuawc as @petersuwara suggest try to install from the beginning, else reinstall the [email protected] separately
Did not work for me, even after upgrading npm. Previous versions of react-native seemed to work ok until 0.43. Here is the error:
FAILURE: Build failed with an exception.
Update: I resolved this by adding a gradle.properties file to my .gradle folder with proxy variables in it (I am behind a proxy). The solution is specific for Android since react-native uses gradle for building the Android version.
I am on windows, so my .gradle folder was C:\Usersmy_user_id\.gradle. Here are the variables I set (replace my_proxy and port values with whatever is proper in your environment):
systemProp.http.proxyHost=my_proxy.com
systemProp.http.proxyPort=80
systemProp.https.proxyHost=my_proxy.com
systemProp.https.proxyPort=80
@liftyourgame amazing solution, and thanks for the solution too.
It's kind of frustrating that react-native seems to skip React 15.5.0, when this is precisely the version which is required by several different plugins.
[email protected] requires a peer of react@~15.4.1
[email protected] requires a peer of [email protected]
No room at all for react@^15.5.0
when i exe npm install [email protected] --save success.
I was getting the same error initially , then i run following commands :-
module.js:471
throw err;
^
Error: Cannot find module 'anymatch'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/mss/Desktop/cakenew25_aug/MagentoLatest/Rdemo/node_modules/jest-haste-map/node_modules/sane/src/common.js:3:16)
at Module._compile (module.js:570:32)
at Module._extensions..js (module.js:579:10)
at Object.require.extensions.(anonymous function) [as .js] (/home/mss/Desktop/cakenew25_aug/MagentoLatest/Rdemo/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
Any help please , i have been fighting with it from last 2 days.
@githubmss have you tried a new project with out react-native-side-menu ?
Does it still work ?
@petersuwara , let me uninstall that package and try it
@petersuwara yes ,When i build separate demo project with react-native init demo , and try to run that using react-native run-android , the project get run successfully. But when i try to run my existing project it through me error :-
module.js:471
throw err;
^
Error: Cannot find module 'anymatch'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/mss/Desktop/cakenew25_aug/MagentoLatest/Rdemo/node_modules/jest-haste-map/node_modules/sane/src/common.js:3:16)
at Module._compile (module.js:570:32)
at Module._extensions..js (module.js:579:10)
at Object.require.extensions.(anonymous function) [as .js] (/home/mss/Desktop/cakenew25_aug/MagentoLatest/Rdemo/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
@githubmss
Remove NPM, NODE, REACT-NATIVE-CLI.
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 ?
@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
========================================================================
You may want to update following environments after installed linuxbrew.
PATH, MANPATH, INFOPATH
(example: /usr/share/doc/linuxbrew-wrapper/examples/profile)
========================================================================
==> This script will install:
/home/mss/.linuxbrew/bin/brew
/home/mss/.linuxbrew/Library/...
/home/mss/.linuxbrew/share/man/man1/brew.1
Press RETURN to continue or any other key to abort
@githubmss you should look at ->
brew info npm
Suggest brew uninstall npm then find where your node_modules directory is and delete that.
i got something like this :-
brew info npm
node: stable 8.0.0, HEAD
Platform built on V8 to build network applications
https://nodejs.org/
Conflicts with: [email protected], [email protected]
Not installed
From: https://github.com/Linuxbrew/homebrew-core/blob/master/Formula/node.rb
==> Dependencies
Build: xz β, pkg-config β
Recommended: icu4c β
Error: Unsupported special dependency :perl
Please report this bug:
https://github.com/Linuxbrew/linuxbrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting
/home/mss/.linuxbrew/Library/Homebrew/dependency_collector.rb:123:in `parse_symbol_spec'
/home/mss/.linuxbrew/Library/Homebrew/compat/dependency_collector.rb:17:in `parse_symbol_spec'
/home/mss/.linuxbrew/Library/Homebrew/dependency_collector.rb:73:in `parse_spec'
/home/mss/.linuxbrew/Library/Homebrew/dependency_collector.rb:61:in `build'
/home/mss/.linuxbrew/Library/Homebrew/dependency_collector.rb:48:in `block in fetch'
/home/mss/.linuxbrew/Library/Homebrew/dependency_collector.rb:48:in `fetch'
/home/mss/.linuxbrew/Library/Homebrew/dependency_collector.rb:48:in `fetch'
/home/mss/.linuxbrew/Library/Homebrew/dependency_collector.rb:38:in `add'
/home/mss/.linuxbrew/Library/Homebrew/software_spec.rb:155:in `depends_on'
/home/mss/.linuxbrew/Library/Homebrew/formula.rb:1862:in `block in depends_on'
/home/mss/.linuxbrew/Library/Homebrew/formula.rb:1862:in `each'
/home/mss/.linuxbrew/Library/Homebrew/formula.rb:1862:in `depends_on'
/home/mss/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/openssl.rb:36:in `<class:Openssl>'
/home/mss/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/openssl.rb:4:in `load_formula'
/home/mss/.linuxbrew/Library/Homebrew/formulary.rb:21:in `module_eval'
/home/mss/.linuxbrew/Library/Homebrew/formulary.rb:21:in `load_formula'
/home/mss/.linuxbrew/Library/Homebrew/formulary.rb:34:in `load_formula_from_path'
/home/mss/.linuxbrew/Library/Homebrew/formulary.rb:83:in `load_file'
/home/mss/.linuxbrew/Library/Homebrew/formulary.rb:74:in `klass'
/home/mss/.linuxbrew/Library/Homebrew/formulary.rb:70:in `get_formula'
/home/mss/.linuxbrew/Library/Homebrew/formulary.rb:207:in `factory'
/home/mss/.linuxbrew/Library/Homebrew/dependency.rb:32:in `to_formula'
/home/mss/.linuxbrew/Library/Homebrew/dependency.rb:38:in `installed?'
/home/mss/.linuxbrew/Library/Homebrew/cmd/info.rb:142:in `block in decorate_dependencies'
/home/mss/.linuxbrew/Library/Homebrew/cmd/info.rb:141:in `collect'
/home/mss/.linuxbrew/Library/Homebrew/cmd/info.rb:141:in `decorate_dependencies'
/home/mss/.linuxbrew/Library/Homebrew/cmd/info.rb:127:in `block in info_formula'
/home/mss/.linuxbrew/Library/Homebrew/cmd/info.rb:125:in `map'
/home/mss/.linuxbrew/Library/Homebrew/cmd/info.rb:125:in `info_formula'
/home/mss/.linuxbrew/Library/Homebrew/cmd/info.rb:35:in `block in print_info'
/home/mss/.linuxbrew/Library/Homebrew/cmd/info.rb:29:in `each'
/home/mss/.linuxbrew/Library/Homebrew/cmd/info.rb:29:in `each_with_index'
/home/mss/.linuxbrew/Library/Homebrew/cmd/info.rb:29:in `print_info'
/home/mss/.linuxbrew/Library/Homebrew/cmd/info.rb:18:in `info'
/home/mss/.linuxbrew/Library/brew.rb:84:in `<main>'
@githubmss please e-mail me on [email protected] I can help you there.
@petersuwara , i have mailed you , please let me know if you require any further information.Thanks for your support . Appreciate it!!!!
@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.
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 install again solved it.
Just delete package-lock.json solved the problem. Don't worry, after you run npm install, package-lock.json will come back. I am not familiar with yarn, but I guess the file was generated by yarn to keep packages consistent.
Confirming that deleting package-lock.json and then running npm install clears the issue for me. Thanks!
I fixed with reinstall nodejs
choco install nodejs
i have a problem react-native like
"""""" react-native run-android
Command run-android unrecognized. Make sure that you have run npm install and that you are inside a react-native project."'''
# _ofter install npm like_
its shows
""""" npm install
npm WARN [email protected] requires a peer of react@^0.13.0 || ^0.14.0 || ^15.0.0 but none was installed.
npm WARN [email protected] 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
Removing yarn.lock and package-lock.json then running yarn worked for me.
Most helpful comment
Upgrading npm seems to fix the issue:
npm install npm@latest -g