deprecated errors while installing packagesin gastby - node.js

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.

Related

My React App is giving this error whenever I try to install any dependencies?

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

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.

How to solve the errors with NPM Install?

I am getting the below errors while doing the npm install but if i do npm install --force? everything works fine in the local environment but not during the repository build as my .yaml file script has the "npm install" Can someone help me on how to fix these issues?
I have tried the below two options but not helped to resolve issue
npm audit fix --force
npm install --legacy-peer-deps
screenshot of the error log
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #angular/localize#10.0.14
npm ERR! Found: #angular/compiler#10.2.3
npm ERR! node_modules/#angular/compiler
npm ERR! #angular/compiler#"^10.2.3" from the root project
npm ERR! peer #angular/compiler#"10.2.3" from #angular/compiler-cli#10.2.3
npm ERR! node_modules/#angular/compiler-cli
npm ERR! dev #angular/compiler-cli#"^10.2.3" from the root project
npm ERR! peer #angular/compiler-cli#"^10.0.0" from #angular-devkit/build-angular#0.1002.3
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"^0.1002.3" from the root project
npm ERR! 1 more (#ngtools/webpack)
npm ERR! 1 more (#angular/platform-browser-dynamic)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/compiler#"10.0.14" from #angular/localize#10.0.14
npm ERR! node_modules/#angular/localize
npm ERR! #angular/localize#"^10.0.14" from the root project
npm ERR! peerOptional #angular/localize#"^10.0.0" from #angular-devkit/build-angular#0.1002.3
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"^0.1002.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #angular/compiler#10.0.14
npm ERR! node_modules/#angular/compiler
npm ERR! peer #angular/compiler#"10.0.14" from #angular/localize#10.0.14
npm ERR! node_modules/#angular/localize
npm ERR! #angular/localize#"^10.0.14" from the root project
npm ERR! peerOptional #angular/localize#"^10.0.0" from #angular-devkit/build-angular#0.1002.3
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"^0.1002.3" 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.
Try to remove the package-lock file & your node_modules folder
and re-run the command npm install --legacy-peer-deps
it should be fine

Unable to install react-awesome-query-builder

Ive been trying to install react-awesome-query-builder in my Vdom-Oracle JET project, but I'm getting following error. Could you please help me to solve this issue?
npm i react-awesome-query-builder --save
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: vdom-chart-sample#1.0.0
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR! peer react#"^16.8.4 || ^17.0.1 || ^18.0.0" from react-awesome-query-builder#5.3.1
npm ERR! node_modules/react-awesome-query-builder
npm ERR! react-awesome-query-builder#"^5.3.1" from the root project
npm ERR! peer react#">=16.0.0" from #ant-design/icons#4.7.0
npm ERR! node_modules/#ant-design/icons
npm ERR! #ant-design/icons#"^4.7.0" from the root project
npm ERR! peer #ant-design/icons#"^4.0.0" from react-awesome-query-builder#5.3.1
npm ERR! node_modules/react-awesome-query-builder
npm ERR! react-awesome-query-builder#"^5.3.1" from the root project
npm ERR! 4 more (react-dom, #emotion/react, #emotion/styled, #fortawesome/react-fontawesome)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0 || ^17.0.0" from #material-ui/core#4.12.4
npm ERR! node_modules/#material-ui/core
npm ERR! peer #material-ui/core#"^4.12.3" from react-awesome-query-builder#5.3.1
npm ERR! node_modules/react-awesome-query-builder
npm ERR! react-awesome-query-builder#"^5.3.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\Rence Abishek\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\Rence Abishek\AppData\Local\npm-cache\_logs\2022-09-07T12_45_29_407Z-debug-0.log
Note: If I try using --force, its working fine, But I'm not sure if it will become problem in future!

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