ERESOLVE unable to resolve dependency tree for redux - node.js

I've tried with both --force and --legacy-peer-deps, but nothing seems to work. I'm currently using node#10.2.0 in macOS.
hiteshagarwal#Hiteshs-MBP kuber % npm i
(node:48924) 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: client#0.1.0
npm ERR! Found: redux#4.1.0
npm ERR! node_modules/redux
npm ERR! redux#"^4.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer redux#"^2.0.0 || ^1.0.0" from redux-log-slow-reducers#0.0.2
npm ERR! node_modules/redux-log-slow-reducers
npm ERR! redux-log-slow-reducers#"0.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! See /Users/hiteshagarwal/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/hiteshagarwal/.npm/_logs/2021-05-09T13_52_12_776Z-debug.log

After resolving the conflict issue with --legacy-peer-deps there was other many errors which were reflecting about node-gyp, gcc, const denominator, etc.
It’s resolved now. There was a conflict between the npm and node versions. I was using node 10.2.0 with npm 5.2.0 and some node-gyp cache files were also there from node 16.* version which was the reasons. I have cleaned the system with all the nvm, npm and node files and other caches and then reinstalled the node#10.2.0 from the web and it contains npm 5.6.* with which I was able to solve my issue.

Related

I cannot install dayjs library on new angular app

I'm new to angular and I'm currently making some tutorials and I ran onto some dependency tree issue when I try to install dayjs library. I looked for an answer and I assume that the library should be updated.
I run the following command :
npm install --save angular-dayjs dayjs
and the result I got is
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: test-app#0.0.0
npm ERR! Found: #angular/common#13.1.3
npm ERR! node_modules/#angular/common
npm ERR! #angular/common#"~13.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/common#"^11.2.7" from angular-dayjs#0.0.4
npm ERR! node_modules/angular-dayjs
npm ERR! angular-dayjs#"*" 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 assume that the author of the library should rebuild the it against latest angular/common but
is there any chance to solve this issue on my own?
Thank you in advance!

I deleted my node modules and package lock.json and tried reinstalling them back using npm install but i keep getting this errors

This is the update error
i updated the css-loader and i am getting new error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: app#0.1.0
npm ERR! Found: webpack#5.74.0
npm ERR! node_modules/webpack
npm ERR! dev webpack#"^5.74.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0" from html-webpack-plugin#3.2.0
npm ERR! node_modules/html-webpack-plug in
npm ERR! html-webpack-plugin#"^3.2.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!
npm ERR! See C:\Users\OBIORA JUSTICE\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\OBIORA JUSTICE\AppData\Local\npm-cache\_logs\2022-09-26T09_37_37_869Z-debug-0.log
The version of css-loader specified in your dependencies works with Webpack 4, but you're also depending on Webpack 5.
Upgrade css-loader in your package.json to a newer version (e.g. 6.7.1, the current version), then try again.

Resolving dependency conflict for npm install in Angular application

I had several error messages for overriding peer dependencies when doing an npm install. After following the steps proposed by the accepted solution to this post. The most essential part being change the ~ versions to ^, remove node_modules and (if it exists) package-lock.json and run npm install again. I have now reduced the error message to the following :
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: console#0.0.0
npm ERR! Found: tslib#2.4.0
npm ERR! node_modules/tslib
npm ERR! tslib#"^2.0.3" from the root project
npm ERR! tslib#"^2.0.0" from #angular/cdk#10.2.7
npm ERR! node_modules/#angular/cdk
npm ERR! #angular/cdk#"^10.2.0" from the root project
npm ERR! peer #angular/cdk#">=9.0.0" from mat-table-exporter#9.1.2
npm ERR! node_modules/mat-table-exporter
npm ERR! mat-table-exporter#"^9.0.2" from the root project
npm ERR! 1 more (#angular/material)
npm ERR! 6 more (#angular/common, #angular/core, #angular/material, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer tslib#"^1.10.0" from mat-table-exporter#9.1.2
npm ERR! node_modules/mat-table-exporter
npm ERR! mat-table-exporter#"^9.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! See /my/path/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /my/path/.npm/_logs/2022-07-21T15_27_07_820Z-debug-0.log
How do I solve this dependency issue? I cannot simply use --force or --legacy-peer-deps because my next step afterwards is moving from Angular 10 to 13. I tried doing the upgrade without fixing this issue and it forces #angular/cdk to remain at 10.x.x

npm install fails - version mismatch

i am new to npm, and have trouble running npm install on this repo: https://github.com/ttencate/jfxr
after the initial install failed with error code 1, i found resources pointing towards updating the package versions.
after running
npx npm-check-updates -u
npm install still fails, this time with a reasonable error stack:
p#MBP-von-up app % npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: jfxr-app#0.14.0
npm ERR! Found: eslint#8.19.0
npm ERR! node_modules/eslint
npm ERR! dev eslint#"^8.19.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint#">=1.6.0 <7.0.0" from eslint-loader#2.2.1
npm ERR! node_modules/eslint-loader
npm ERR! dev eslint-loader#"^2.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 /Users/tp/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/tp/.npm/_logs/2022-07-05T13_34_08_046Z-debug-0.log
but i am still unclear on how to resolve this version mismatch.
also, running with the old version would be fine for me too, if it worked at all...
any help / tips towards resources appreciated!

Errors in dependency tree every time I install a fresh react-app

It is been a while that I am getting an error every time I create a react app.
I tried to remove all node/npm versions and I reinstall a clean one with the latest node LTS, however, I am still getting the below error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: type-fest#0.21.3
npm ERR! node_modules/type-fest
npm ERR! type-fest#"^0.21.3" from ansi-escapes#4.3.2
npm ERR! node_modules/ansi-escapes
npm ERR! ansi-escapes#"^4.2.1" from #jest/core#26.6.3
npm ERR! node_modules/#jest/core
npm ERR! #jest/core#"^26.6.0" from jest#26.6.0
npm ERR! node_modules/jest
npm ERR! peer jest#"^26.0.0" from jest-watch-typeahead#0.6.1
npm ERR! node_modules/jest-watch-typeahead
npm ERR! 1 more (react-scripts)
npm ERR! 1 more (jest-cli)
npm ERR! ansi-escapes#"^4.3.1" from jest-watch-typeahead#0.6.1
npm ERR! node_modules/jest-watch-typeahead
npm ERR! jest-watch-typeahead#"0.6.1" from react-scripts#4.0.3
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"^4.0.3" from the root project
npm ERR! 2 more (jest-watcher, terminal-link)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional type-fest#"^0.13.1" from #pmmmwh/react-refresh-webpack-plugin#0.4.3
npm ERR! node_modules/#pmmmwh/react-refresh-webpack-plugin
npm ERR! #pmmmwh/react-refresh-webpack-plugin#"0.4.3" from react-scripts#4.0.3
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"^4.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 /Users/johnnys/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/johnnys/.npm/_logs/2021-07-10T18_33_36_275Z-debug.log
You are getting the same type of error from a similar post about this issue npm audit fix --force never able to avoid vulnerabilities
There is also a closed ticket in GitHub create-react-app repo. Here is one of the answers:
Hi,
ensure that
your dependencies (including NodeJS/npm/npx/yarn) are up-to-date
ensure that CRA is not installed globally Follow
https://create-react-app.dev/docs/getting-started/ guide to get
started
You need probably keep updating the dependecies to the latest version and wait untill the latest release fix this issue.

Resources