npm install command is showing too many error message - node.js

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.

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

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

Cannot install under npm packages anymore

When I want to install something under npm then I get an error. I try to fix it so many ways but failed. Here is the error
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: undefined#undefined
npm ERR! Found: #nomiclabs/hardhat-ethers#0.3.0-beta.13
npm ERR! node_modules/#nomiclabs/hardhat-ethers
npm ERR! dev #nomiclabs/hardhat-ethers#"npm:hardhat-deploy-ethers" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev #nomiclabs/hardhat-waffle#"^2.0.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #nomiclabs/hardhat-ethers#2.1.1
npm ERR! node_modules/#nomiclabs/hardhat-ethers
npm ERR! peer #nomiclabs/hardhat-ethers#"^2.0.0" from #nomiclabs/hardhat-waffle#2.0.3
npm ERR! node_modules/#nomiclabs/hardhat-waffle
npm ERR! dev #nomiclabs/hardhat-waffle#"^2.0.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.
npm ERR!
npm ERR! See C:\Users\Mazhar\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\Mazhar\AppData\Local\npm-cache\_logs\2022-09-11T23_40_30_606Z-debug-0.log
PS C:\Users\Mazhar\Documents\Alchemy-weekly\nft-marketplace-scratch>

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.

Version Issue in integrating mobx-react in app

I received this error for my app sample-login-page while running npm update
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: sample-login-page#1.0.0
npm ERR! Found: mobx-react#5.4.4
npm ERR! node_modules/mobx-react
npm ERR! mobx-react#"5.4.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer mobx-react#"^4.3.5" from bernie-core#0.41.4
npm ERR! node_modules/bernie-core
npm ERR! peer bernie-core#">=0.24.7" from bernie-test-util#0.35.4
npm ERR! node_modules/bernie-test-util
npm ERR! dev bernie-test-util#"0.35.4" from the root project
npm ERR! peer bernie-core#">=0.25.0" from #gc/global-controls-store#0.1.3
npm ERR! node_modules/#gc/global-controls-store
npm ERR! #gc/global-controls-store#"^0.1.3" from the root project
npm ERR! 1 more (bernie-test-util)
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
After upgrading mobx-react by npm install mobx-react --save I came up with same errors.
After installing mobx-react with specifically required version npm i mobx-react#4.3.5. Below error is coming up
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: sample-login-page#1.0.0
npm ERR! Found: mobx#4.15.4
npm ERR! node_modules/mobx
npm ERR! mobx#"4.15.4" from the root project
npm ERR! peer mobx#"^3.4.1 || ^4.0.0" from bernie-core#0.41.4
npm ERR! node_modules/bernie-core
npm ERR! peer bernie-core#">=0.24.7" from bernie-test-util#0.35.4
npm ERR! node_modules/bernie-test-util
npm ERR! dev bernie-test-util#"0.35.4" from the root project
npm ERR! peer bernie-core#">=0.25.0" from #gc/global-controls-store#0.1.3
npm ERR! node_modules/#gc/global-controls-store
npm ERR! #gc/global-controls-store#"^0.1.3" from the root project
npm ERR! 1 more (bernie-test-util)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer mobx#"^2.6.3 || ^3.0.0" from mobx-react#4.3.5
npm ERR! node_modules/mobx-react
npm ERR! mobx-react#"4.3.5" from the root project
npm ERR! peer mobx-react#"^4.3.5" from bernie-test-util#0.35.4
npm ERR! node_modules/bernie-test-util
npm ERR! dev bernie-test-util#"0.35.4" from the root project
npm ERR! 2 more (#gc/global-controls-store, bernie-core)
Can someone help me out with suggestions around this?
You can run this :
npm install mobx-react --save --legacy-peer-deps

Resources