My React App is giving this error whenever I try to install any dependencies? - node.js

React App is giving this error whenever i try to install any dependency and also tried
uninstall and reinstall NodeJs but its not working. Its very difficult to distinguish error whats happening.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-dfb#1.0.4
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! peer react#"*" from #testing-library/react#11.2.7
npm ERR! node_modules/#testing-library/react
npm ERR! #testing-library/react#"^11.2.7" from the root project
npm ERR! peer react#"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from mini-create-react-context#0.4.1
npm ERR! node_modules/mini-create-react-context
npm ERR! mini-create-react-context#"^0.4.0" from react-router#5.2.0
npm ERR! node_modules/react-router
npm ERR! react-router#"5.2.0" from react-router-dom#5.2.0
npm ERR! node_modules/react-router-dom
npm ERR! react-router-dom#"^5.2.0" from the root project
npm ERR! 10 more (react-device-detect, react-dom, react-h5-audio-player, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"~16.0.0" from react-dfb#1.0.4
npm ERR! node_modules/react-dfb
npm ERR! react-dfb#"^1.0.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#16.0.0
npm ERR! node_modules/react
npm ERR! peer react#"~16.0.0" from react-dfb#1.0.4
npm ERR! node_modules/react-dfb
npm ERR! react-dfb#"^1.0.4" 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\Md Yasin Ansari\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\Md Yasin Ansari\AppData\Local\npm-cache\_logs\2022-11-13T12_55_52_296Z-debug-0.log

Related

Stylint error on installing node_modules. Even while running npm start this error keep arrising

Whenever I try to install modules for the project it pops up an error for stylelint.
There is no error in code and even after removing stylelint I am unable to solve this issue
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: stylelint-custom-processor-loader#0.2.1
npm ERR! Found: stylelint#14.11.0
npm ERR! node_modules/stylelint
npm ERR! peer stylelint#"^14.10.0" from stylelint-config-recommended#9.0.0
npm ERR! node_modules/stylelint-config-recommended
npm ERR! dev stylelint-config-recommended#"9.0.0" from the root project
npm ERR! peer stylelint#"^13.0.0 || ^14.0.0" from vite-plugin-stylelint#3.0.7
npm ERR! node_modules/vite-plugin-stylelint
npm ERR! dev vite-plugin-stylelint#"^3.0.7" from the root project
npm ERR! 1 more (the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer stylelint#"^8.0.0" from stylelint-custom-processor-loader#0.2.1
npm ERR! node_modules/stylelint-custom-processor-loader
npm ERR! dev stylelint-custom-processor-loader#"^0.2.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: stylelint#8.4.0
npm ERR! node_modules/stylelint
npm ERR! peer stylelint#"^8.0.0" from stylelint-custom-processor-loader#0.2.1
npm ERR! node_modules/stylelint-custom-processor-loader
npm ERR! dev stylelint-custom-processor-loader#"^0.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\nitin\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\nitin\AppData\Local\npm-cache\_logs\2022-11-13T11_31_25_207Z-debug-0.log

npm install command is showing too many error message

I need to install node in my project by running this command:
npm install
But after run this command I am getting this error message:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: browser-sync-webpack-plugin#2.0.1
npm ERR! Found: webpack#4.46.0
npm ERR! node_modules/webpack
npm ERR! peer webpack#"^4.0.0" from #intervolga/optimize-cssnano-plugin#1.0.6
npm ERR! node_modules/#intervolga/optimize-cssnano-plugin
npm ERR! #intervolga/optimize-cssnano-plugin#"^1.0.5" from #vue/cli-service#4.5.17
npm ERR! node_modules/#vue/cli-service
npm ERR! dev #vue/cli-service#"~4.5.13" from the root project
npm ERR! 5 more (#vue/cli-plugin-babel, #vue/cli-plugin-eslint, ...)
npm ERR! peer webpack#"^4.0.0 || ^5.0.0" from #soda/friendly-errors-webpack-plugin#1.8.1
npm ERR! node_modules/#soda/friendly-errors-webpack-plugin
npm ERR! #soda/friendly-errors-webpack-plugin#"^1.7.1" from #vue/cli-service#4.5.17
npm ERR! node_modules/#vue/cli-service
npm ERR! dev #vue/cli-service#"~4.5.13" from the root project
npm ERR! 5 more (#vue/cli-plugin-babel, #vue/cli-plugin-eslint, ...)
npm ERR! 28 more (#vue/cli-plugin-babel, #vue/cli-plugin-eslint, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"^1 || ^2 || ^3" from browser-sync-webpack-plugin#2.0.1
npm ERR! node_modules/browser-sync-webpack-plugin
npm ERR! browser-sync-webpack-plugin#"2.0.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: webpack#3.12.0
npm ERR! node_modules/webpack
npm ERR! peer webpack#"^1 || ^2 || ^3" from browser-sync-webpack-plugin#2.0.1
npm ERR! node_modules/browser-sync-webpack-plugin
npm ERR! browser-sync-webpack-plugin#"2.0.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 /Users/hello/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/hello/.npm/_logs/2022-10-06T12_31_49_438Z-debug-0.log
Would you please tell me why it's showing this error message and how can I solve it ?
Run npm install --legacy-peer-deps
This question has already been answered here.

Installing nest/terminus gives dependency tree error

Whenever I try to install nest/terminus
npm i #nestjs/terminus
I get the following error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: typeorm#0.3.7
npm ERR! Found: ioredis#4.28.5
npm ERR! node_modules/ioredis
npm ERR! peer ioredis#"^4.0.0" from #nestjs-modules/ioredis#1.0.1
npm ERR! node_modules/#nestjs-modules/ioredis
npm ERR! #nestjs-modules/ioredis#"^1.0.1" from the root project
npm ERR! ioredis#"^4.28.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional ioredis#"^5.0.4" from typeorm#0.3.7
npm ERR! node_modules/typeorm
npm ERR! peertypeorm#"^0.3.0" from #nestjs/typeorm#8.1.4
npm ERR! node_modules/#nestjs/typeorm
npm ERR! #nestjs/typeorm#"^8.1.4" from the root project
npm ERR! typeorm#"^0.3.7" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: ioredis#5.2.1
npm ERR! node_modules/ioredis
npm ERR! peerOptional ioredis#"^5.0.4" from typeorm#0.3.7
npm ERR! node_modules/typeorm
npm ERR! peer typeorm#"^0.3.0" from #nestjs/typeorm#8.1.4
npm ERR! node_modules/#nestjs/typeorm
npm ERR! #nestjs/typeorm#"^8.1.4" from the root project
npm ERR! typeorm#"^0.3.7" 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.
I tried running the following command
npm install --save --legacy-peer-deps
it ran okay, but on repeating the terminus installation I got the same error. Any idea what I might be doing wrong?

deprecated errors while installing packagesin gastby

I am using a Gatsby theme and facing this errors while installing packages ,
I've tried npm install --legacy-peer-deps
but when I run gatsby develop I get the errors again :
this is the errors I am facing :
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-owl-carousel3#2.2.5
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"^17.0.2" from the root project
npm ERR! peer react#"15.x || 16.x || 17.x" from #gatsbyjs/reach-router#1.3.6
npm ERR! node_modules/#gatsbyjs/reach-router
npm ERR! #gatsbyjs/reach-router#"^1.3.6" from gatsby#4.6.0
npm ERR! node_modules/gatsby
npm ERR! gatsby#"^4.4.0" from the root project
npm ERR! 12 more (babel-plugin-remove-graphql-queries, ...)
npm ERR! peer #gatsbyjs/reach-router#"^1.3.5" from gatsby-link#4.6.0
npm ERR! node_modules/gatsby-link
npm ERR! gatsby-link#"^4.6.0" from gatsby#4.6.0
npm ERR! node_modules/gatsby
npm ERR! gatsby#"^4.4.0" from the root project
npm ERR! 12 more (babel-plugin-remove-graphql-queries, ...)
npm ERR! 1 more (gatsby-react-router-scroll)
npm ERR! 18 more (#loadable/component, gatsby, gatsby-link, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^0.14.0 || ^15.0.0 || ^16.0.0" from react-owl-carousel3#2.2.5
npm ERR! node_modules/react-owl-carousel3
npm ERR! react-owl-carousel3#"^2.2.5" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#16.14.0
npm ERR! node_modules/react
npm ERR! peer react#"^0.14.0 || ^15.0.0 || ^16.0.0" from react-owl-carousel3#2.2.5
npm ERR! node_modules/react-owl-carousel3
npm ERR! react-owl-carousel3#"^2.2.5" from the root project
npm ERR!
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\foxxp\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\foxxp\AppData\Local\npm-cache\_logs\2022-05-04T23_14_25_607Z-debug-0.log
It seems there lot of deprecated versions
How Can i fix this please ??
Try:
Remove your node_modules
Install the (peer) dependencies again with:
npm install --legacy-peer-deps
Start the development process again with:
gatsby develop
If the issue persists remove your package-lock.json file and redo all the processes above.

react-router-dom ERESOLVE could not resolve

I tried to install the react-router-dom for my mernstack ecommerce website.It got error like this. I tried lot of methods to installing this .But I couldn't.My mernstack application is ecommerce website.
PS A:\my react\mernstack ecommerce\E-Commerce> npm install --save react-router-dom
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: e-commerce#1.0.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! peer react#"^0.14.9 || ^15.3.0 || ^16.0.0 || ^17.0.0" from #redux-
devtools/core#3.11.0
npm ERR! node_modules/#redux-devtools/core
npm ERR! dev #redux-devtools/core#"^3.11.0" from the root project
npm ERR! peer react#"^16.8.3 || ^17 || ^18" from react-redux#7.2.8
npm ERR! node_modules/react-redux
npm ERR! peer react-redux#"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" from #redux-
devtools/core#3.11.0
npm ERR! node_modules/#redux-devtools/core
npm ERR! dev #redux-devtools/core#"^3.11.0" from the root project
npm ERR! react-redux#"^7.2.8" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! react-router-dom#"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#18.0.0
npm ERR! node_modules/react
npm ERR! peer react#"^18.0.0" from react-dom#18.0.0
npm ERR! node_modules/react-dom
npm ERR! peer react-dom#">=16.8" from react-router-dom#6.3.0
npm ERR! node_modules/react-router-dom
npm ERR! react-router-dom#"*" 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\Kavindra\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\Kavindra\AppData\Local\npm-cache\_logs\2022-04-14T10_55_52_941Z-
debug-0.log
PS A:\my react\mernstack ecommerce\E-Commerce>

Resources