trying to understand peer dependency problems - npm

if I run npm, it installs everything fine but it tells me I have 19 HIGH severe vulnerabilities.. it tells me to run npm audit fix
but if I do that, I get:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: angular-frontend#0.0.1
npm ERR! Found: rxjs#7.5.7
npm ERR! node_modules/rxjs
npm ERR! rxjs#"~7.5.0" from the root project
npm ERR! peer rxjs#"^6.5.3 || ^7.4.0" from #angular/core#14.2.8
npm ERR! node_modules/#angular/core
npm ERR! #angular/core#"^14.1.0" from the root project
npm ERR! peer #angular/core#">=6.0.0" from #storybook/angular#6.1.21
npm ERR! node_modules/#storybook/angular
npm ERR! dev #storybook/angular#"^6.1.21" from the root project
npm ERR! 7 more (#angular/compiler, #angular/service-worker, ...)
npm ERR! 3 more (#angular/common, ng-packagr, #angular/forms)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer rxjs#"^6.0.0" from #storybook/angular#6.1.21
npm ERR! node_modules/#storybook/angular
npm ERR! dev #storybook/angular#"^6.1.21" 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.
My first question is, why is this "not" a problem for installation? (it succeeds, my app builds and runs)...
My second question is, is there not a way to supply the version of rxjs that #storybook/angular#6.1.21 wants? Like, can I not have both rxjs 7.5.7 AND ^6.0.0 and just have ^6.0.0 available for storybook?

Related

Error (code ERESOLVE) when in trying to run the command "npm install" on console log

I'm on a college project where I got a project with angular and typescript, languages which I have difficulty and I'm having problems when trying to run the project
Why when in trying to run the command install
npm install
The console return to me:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: sisgeo#1.0.0
npm ERR! Found: zone.js#0.8.29
npm ERR! node_modules/zone.js
npm ERR! zone.js#"^0.8.19" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer zone.js#"~0.9.1" from #angular/core#8.2.14
npm ERR! node_modules/#angular/core
npm ERR! #angular/core#"^8.2.1" from the root project
npm ERR! peer #angular/core#"8.2.14" from #angular/animations#8.2.14
npm ERR! node_modules/#angular/animations
npm ERR! #angular/animations#"^8.2.1" 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\desou\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\desou\AppData\Local\npm-cache\_logs\2022-09-13T01_56_25_713Z-debug-0.log
You can take a look at this resource (the problem mainly deals with dependency conflicts):
Unable to resolve dependency tree error when installing npm packages

React Native deck swiper library not working

I am trying to install the react native deck swiper using npm and I am getting the following error. Guys is the something wrong with this library "npm install react-native-deck-swiper" and if there is how do we fix it?
npm WARN config global --global, --local are deprecated. Use --location=global instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-native-deck-swiper#2.0.8
npm ERR! Found: react-native#0.69.5
npm ERR! node_modules/react-native
npm ERR! peer react-native#"" from #react-native-community/cli#8.0.6
npm ERR! node_modules/#react-native-community/cli
npm ERR! #react-native-community/cli#"^8.0.4" from react-native#0.69.5
npm ERR! peer react-native#"" from #react-navigation/elements#1.3.5
npm ERR! node_modules/#react-navigation/elements
npm ERR! #react-navigation/elements#"^1.3.5" from #react-navigation/native-stack#6.8.0
npm ERR! node_modules/#react-navigation/native-stack
npm ERR! #react-navigation/native-stack#"^6.8.0" from the root project
npm ERR! 6 more (#react-navigation/native, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native#"^0.49.1" from react-native-deck-swiper#2.0.8
npm ERR! node_modules/react-native-deck-swiper
npm ERR! react-native-deck-swiper#"^2.0.8" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react-native#0.49.5
npm ERR! node_modules/react-native
npm ERR! peer react-native#"^0.49.1" from react-native-deck-swiper#2.0.8
npm ERR! node_modules/react-native-deck-swiper
npm ERR! react-native-deck-swiper#"^2.0.8" 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\Leago\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\Leago\AppData\Local\npm-cache_logs\2022-08-31T23_17_27_722Z-debug-0.log
I had the same issue as you, I found out it's more related to the command npm, apparently it works with yarn.
You can check these two links in which the problem is treated, but I don't think forcing the installation with npm install --force is a good idea:
React-native-deck-swiper unable to install
https://github.com/alexbrillant/react-native-deck-swiper/issues/337

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

ERESOLVE unable to resolve dependency tree for Bottom-tabs

i am trying to install react-navigation/bottom-tabs and i keep getting this following error
PS C:\Users\chuy\LaYa> npm install #react-navigation/bottom-tabs
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined#undefined
npm ERR! Found: #react-navigation/native#5.9.8
npm ERR! node_modules/#react-navigation/native
npm ERR! #react-navigation/native#"^5.9.8" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #react-navigation/native#"^6.0.0" from #react-navigation/bottom-tabs#6.0.5
npm ERR! node_modules/#react-navigation/bottom-tabs
npm ERR! #react-navigation/bottom-tabs#"*" 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\chuy\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\chuy\AppData\Local\npm-cache\_logs\2021-09-01T01_09_31_834Z-debug.log
I had the same problem. This issue is related to the Expo version. I was unable to update the version, so I created a new project and moved everything there files.

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.