React-navigation- dependencies (Error while install NPM navigation dependencies package installation) - react-native

when I install this package
1 . npm install #react-native-community/masked-view .
it shows error like this
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: Sample_pro#0.0.1
npm ERR! Found: react#17.0.1
npm ERR! node_modules/react
npm ERR! react#"17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.0" from #react-native-community/masked-view#0.1.10
npm ERR! node_modules/#react-native-community/masked-view
npm ERR! #react-native-community/masked-view#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\HP\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP\AppData\Local\npm-cache_logs\2021-04-21T03_52_51_024Z-debug.log
-----How should I solve this problem-----

Ther error message is telling you that
your proj is using react # 17.0.1 version while #react-native-community/masked-view 0.1.10 has a dependency of react # 16.
To solve it, you can choose one of the followings:
upgrade #react-native-community/masked-view to the latest package which is accepting react#16 and react#17
downgrade your root project's react version to 16

please remove package-lock.json file and try to install again hope it will work.

Related

Install AsyncStorage React Native doesnt work

If i want to add "npm install #react-native-community/async-storage" in the terminal.
There is this error and i dont know why.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined#undefined
npm ERR! Found: react#16.14.0
npm ERR! node_modules/react
npm ERR! react#"^16.13.0" from the root project
npm ERR! peer react#"^16.8" from #react-native-community/async-storage#1.12.1
npm ERR! node_modules/#react-native-community/async-storage
npm ERR! #react-native-community/async-storage#"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"18.1.0" from react-native#0.70.6
npm ERR! node_modules/react-native
npm ERR! peer react-native#">=0.59" from #react-native-community/async-storage#1.12.1
kjf Is it maybe of my react version. If yes how can I change my version
you have to change your react version to resolve this error.
using npm install react#[version] --save cmmand you can change your react Version.
Try using this #react-native-async-storage/async-storage package

ERESOLVE unable to resolve dependency tree while installing Font Awesome

I am workin on a react native project and I tried installing Font Awesome "npm i --save #fortawesome/react-native-fontawesome #fortawesome/fontawesome-svg-core react-native-svg"
using but I got
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: homesick#1.0.0
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR! react#"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"18.0.0" from react-native#0.69.4
npm ERR! node_modules/react-native
npm ERR! react-native#"0.69.4" from the root project
npm ERR! peer react-native#">= 0.67" from #fortawesome/react-native-fontawesome#0.3.0
npm ERR! node_modules/#fortawesome/react-native-fontawesome
npm ERR! #fortawesome/react-native-fontawesome#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/itaylador/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/itaylador/.npm/_logs/2022-08-15T22_50_28_934Z-debug-0.log
How can I solve this error?
I had the same issue recently. Tried a lot configurations but the only thing that worked for me was downgrade from react#18.2.0 to react#18.0.0 in the package.json
Some other guys here on stackoverflow gave the hint (if you have peer dependency conflicts) to open (on MacOS) /Users/YourUser/.npm folder and delete the folders _cacache, _logs, _npx
You can also try to delete node_modules folder and package-lock.json file at the end and re-install via "npm install"

Unable to install vue-property-decorator or vue-class-component, when created project using vite

I have created a Vue3 project using Vite. When Vite is used I am unable to install vue-property-decorator or vue-class-component. It says it is unable to resolve dependency tree. Errors are attached below:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: new-vite-project#0.0.0
npm ERR! Found: vue#3.2.32
npm ERR! node_modules/vue
npm ERR! vue#"^3.2.25" from the root project
npm ERR! peer vue#"*" from vue-property-decorator#9.1.2
npm ERR! node_modules/vue-property-decorator
npm ERR! vue-property-decorator#"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue#"^2.0.0" from vue-class-component#7.2.6
npm ERR! node_modules/vue-class-component
npm ERR! peer vue-class-component#"*" from vue-property-decorator#9.1.2
npm ERR! node_modules/vue-property-decorator
npm ERR! vue-property-decorator#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/zohaib/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/zohaib/.npm/_logs/2022-04-13T20_02_35_956Z-debug.log
vue-class-component still doesn't officially support Vue 3.
It has a Release Candidate (RC) version though, but it may not be ready for production.
See this comment: vue-class-component issue #406
To install it:
npm install vue-class-component#8.0.0-rc.1 vue-property-decorator#10.0.0-rc.3

#react-native-community/datetimepicker install throwing error

I tried to install datetime picker for my react-native (expo) project but, when i try to install it;
expo install #react-native-community/picker
It throws error;
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined#undefined
npm ERR! Found: react#16.13.1
npm ERR! node_modules/react
npm ERR! react#"16.13.1" from the root project
npm ERR! peer react#">=16.8.3" from #react-native-community/datetimepicker#3.2.0
npm ERR! node_modules/#react-native-community/datetimepicker
npm ERR! #react-native-community/datetimepicker#"3.2.0" from the root project
npm ERR! 1 more (react-native)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"17.0.1" from react-native-windows#0.64.12
npm ERR! node_modules/react-native-windows
npm ERR! peer react-native-windows#">=0.62" from #react-native-community/datetimepicker#3.2.0
npm ERR! node_modules/#react-native-community/datetimepicker
npm ERR! #react-native-community/datetimepicker#"3.2.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\irfan\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\irfan\AppData\Local\npm-cache\_logs\2021-06-30T13_38_37_968Z-debug.log
As per this error (if i got it right), this requires a different version of react (17.0.1) which when installed solves the problem but this version of the react is not supported by expo.
Please provide a solution which will be compatible with expo.
After searching for a whole day, i thought to post it here. But just after posting, i got an answer in my mind.
Why not to clone it directly from the github instead of installing it with expo or npm.
Did the same thing and now working fine.
This issue was also raised on github but it had no solutions.

Expo and Native Base unable to resolve dependency tree

Fresh install expo init firstapp then next npm install native-base. I encounter error like this below. I tried deleting node_modules and tried also deleting expo cli I have no success.
Anyone encounter this?
PS E:\Projects\ReactNative\firstapp> npm install native-base
>>
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react#16.13.1
npm ERR! node_modules/react
npm ERR! peer react#"^16.13.1" from react-dom#16.13.1
npm ERR! node_modules/react-dom
npm ERR! peer react-dom#">=16.5.1" from react-native-web#0.13.18
npm ERR! node_modules/react-native-web
npm ERR! react-native-web#"~0.13.12" from the root project
npm ERR! react-dom#"16.13.1" from the root project
npm ERR! peer react#"*" from react-native-safe-area-context#3.2.0
npm ERR! node_modules/react-native-safe-area-context
npm ERR! react-native-safe-area-context#"3.2.0" from expo#41.0.1
npm ERR! node_modules/expo
npm ERR! expo#"~41.0.1" from the root project
npm ERR! 5 more (react-native-web, use-subscription, the root project, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"17.0.1" from react-native-windows#0.64.8
npm ERR! node_modules/native-base/node_modules/react-native-windows
npm ERR! peer react-native-windows#">=0.62" from #react-native-community/datetimepicker#3.5.0
npm ERR! node_modules/native-base/node_modules/#react-native-community/datetimepicker
npm ERR! #react-native-community/datetimepicker#"^3.0.2" from native-base#2.15.2
npm ERR! node_modules/native-base
npm ERR! native-base#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\XXX\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\XXX\AppData\Local\npm-cache\_logs\2021-05-23T08_04_02_291Z-debug.log
Looks like maybe the solution to your problem might be to use a compatible version of native base with your react native version see table in native base documentation on the Compatibility Versions section.