Npm dependency issue: react 17.0.2 and "react-swipeable-views - javascript

I'm trying to add react-swipeable-views library to my Project, but I get the following error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: e-ecom#0.1.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#"^15.3.0 || ^16.0.0 || ^17.0.0" from react-swipeable-views#0.14.0
npm ERR! node_modules/react-swipeable-views
npm ERR! react-swipeable-views#"0.14.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!
How can I resolve this?

you can try to add --legacy-peer-deps OR --force at the end of the install command as mentioned in the error you got

Related

Why am I receiving a Conflicting peer dependency about multer when installing dayjs?

When I try to install dayjs I receive this error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: multer-gridfs-storage#5.0.2
npm ERR! Found: multer#1.4.5-lts.1
npm ERR! node_modules/multer
npm ERR! multer#"^1.4.5-lts.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer multer#"^1.4.2" from multer-gridfs-storage#5.0.2
npm ERR! node_modules/multer-gridfs-storage
npm ERR! multer-gridfs-storage#"^5.0.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: multer#1.4.4
npm ERR! node_modules/multer
npm ERR! peer multer#"^1.4.2" from multer-gridfs-storage#5.0.2
npm ERR! node_modules/multer-gridfs-storage
npm ERR! multer-gridfs-storage#"^5.0.2" 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!
Gridfs and multer is all working fine and I only get this error when installing dayjs.
can somebody tell me what's going on and how to fix this issue, please?
Many thanks
Downgrade to multer version 4.

I am trying to download compression webpack plugin with npm but its giving me error

Hi there this is the message that APPEARS WHEN I TRY TO RUN THE COMMAND
npm install compression-webpack-plugin
and this is the error:
`PS D:\phaser games\game-slot-machine> npm install compression-webpack-plugin
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: phaser3-project-template#1.1.2
npm ERR! Found: webpack#4.46.0
npm ERR! node_modules/webpack
npm ERR! dev webpack#"^4.41.2" from the root projectnpm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"^5.1.0" from compression-webpack-plugin#10.0.0
npm ERR! node_modules/compression-webpack-plugin
npm ERR! compression-webpack-plugin#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-dnpm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Cheetay\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\Cheetay\AppData\Local\npm-cache_logs\2023-01-31T07_37_59_109Z-debug-0npm install compression-webpack-plugin --save-devine>
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: phaser3-project-template#1.1.2
npm ERR! Found: webpack#4.46.0
npm ERR! node_modules/webpack
npm ERR! dev webpack#"^4.41.2" from the root projectnpm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"^5.1.0" from compression-webpack-plugin#10.0.0
npm ERR! node_modules/compression-webpack-plugin
npm ERR! dev compression-webpack-plugin#"*" 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
n) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Cheetay\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\Cheetay\AppData\Local\npm-cache_logs\2023-01-31T07_39_13_026Z-debug-0.log
PS D:\phaser games\game-slot-machine> npm install compression-webpack-plugin --save-dev
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: phaser3-project-template#1.1.2
npm ERR! Found: webpack#4.46.0
npm ERR! node_modules/webpack
npm ERR! dev webpack#"^4.41.2" from the root projectnpm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"^5.1.0" from compression-webpack-plugin#10.0.0
npm ERR! node_modules/compression-webpack-plugin
npm ERR! dev compression-webpack-plugin#"*" 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\Cheetay\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\Cheetay\AppData\Local\npm-cache_logs\2023-01-31T07_39_20_653Z-debug-0.log`
i am trying to reduce size of my js file in a game and trying to download this plugin that reduces the size.
first, you need to fix the conflict between both the dependency if you want to run both commands at one time, or using --force is also an option if you really want to compress the file.

could not resolve npm ERR! npm ERR! While resolving: vue-awesome-swiper#4.1.1 npm ERR! Found: swiper#6.5.4 when run npm install

i'm try to install a project on my pc but i got this error while runing npm install
it works fine on the old laptop but on the new i got this error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: vue-awesome-swiper#4.1.1
npm ERR! Found: swiper#6.5.4
npm ERR! node_modules/swiper
npm ERR! swiper#"^6.5.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer swiper#"^5.2.0" from vue-awesome-swiper#4.1.1
npm ERR! node_modules/vue-awesome-swiper
npm ERR! vue-awesome-swiper#"^4.1.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: swiper#5.4.5
npm ERR! node_modules/swiper
npm ERR! peer swiper#"^5.2.0" from vue-awesome-swiper#4.1.1
npm ERR! node_modules/vue-awesome-swiper
npm ERR! vue-awesome-swiper#"^4.1.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\mohammed mujahid\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\mohammed mujahid\AppData\Local\npm-cache\_logs\2022-08-28T08_40_24_210Z-debug-0.log
Run npm install --force or npm install --legacy-peer-deps
The above comment will forcefully install all the packages

I am working on my react application, updated all dependencies but still getting this error

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: navbar#0.1.0
npm ERR! Found: react#18.1.0
npm ERR! node_modules/react
npm ERR! react#"^18.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.2.0 || ^17.0.0" from react-modal-video#1.2.8
npm ERR! node_modules/react-modal-video
npm ERR! react-modal-video#"^1.2.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\SajjadAli\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\SajjadAli\AppData\Local\npm-cache\_logs\2022-05-26T10_24_55_932Z-debug.log
Looks like react-modal-video requires a peer dependency of React 16 or 17, but you are using React 18.

Native-Base Installation

When I try to install native-base I get this error:
(node:6636) ExperimentalWarning: The fs.promises API is experimental
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: nayasetup#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! peer react#"*" from native-base#3.0.6
npm ERR! node_modules/native-base
npm ERR! native-base#"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"17.0.2" from react-dom#17.0.2
npm ERR! node_modules/react-dom
npm ERR! peer react-dom#"*" from native-base#3.0.6
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\Hafiz Sikander.com\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\Hafiz Sikander.com\AppData\Local\npm-cache\_logs\2021-07-29T18_25_50_406Z-debug.log

Categories

Resources