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!
Related
I have no idea what I need to do to get NPM install to run successfully after upgrading Node to 18.12.1 and npm to 9.2.0. I keep getting this upstream dependency error. I ran
npm install -g npm-check-updates
ncu -u
npm install
And now this is where I am.
npm install ─╯
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: hipersigno#undefined
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#"^17.0.0" from react-svgmt#1.2.0
npm ERR! node_modules/react-svgmt
npm ERR! react-svgmt#"^1.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!
npm ERR! For a full report see:
npm ERR! /Users/mchildress/.npm/_logs/2023-01-09T16_27_29_875Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mchildress/.npm/_logs/2023-01-09T16_27_29_875Z-debug-0.log
What's going on is that react-svgmt has react 17 set as a peer dependency. This means that it is built only to support react 17. You have react 18 installed and npm sees that conflict and bails. You have the following options:
Downgrade to React 17 by using npm install --save react#^17.0.0 react-dom#^17.0.0
Indicate that you are okay with having a potentially incompatible version by using npm install --legacy-peer-deps.
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!
I'm rather new to upgrading dependencies on my local machine. I'm trying to upgrade MaterialUI using NPM from V4 to V5.
The moment I enter the code: npm install #mui/material #mui/styles, it gives me this huge error.
If someone could please guide me through this, that will be great.
PS C:\Users\rprua564\Documents\autobots-dashboard-appstatic> npm install #mui/material #mui/styles
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: autobots-next-appstatic#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#"^17.0.0" from #mui/styles#5.8.0
npm ERR! node_modules/#mui/styles
npm ERR! #mui/styles#"^5.8.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\rprua564\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\rprua564\AppData\Local\npm-cache\_logs\2022-05-22T20_15_01_551Z-debug.log
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.
I'm trying to learn react/typescript and I'm following a tutorial line for line, but somehow getting this error when trying to install either #chakra-ui/react or #chakra-ui/core. It seems like a dependecy issue with react having been updated. Should I rollback react?
kyoudai.industries git:(master) ✗ npm install #chakra-ui/react framer-motion
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: kyoudai.industries#1.0.0
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#"16.x || 17.x" from #chakra-ui/react#1.0.1
npm ERR! node_modules/#chakra-ui/react
npm ERR! #chakra-ui/react#"*" from the root project
npm ERR! 2 more (#emotion/react, #emotion/styled)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8" from framer-motion#2.9.4
npm ERR! node_modules/framer-motion
npm ERR! framer-motion#"*" from the root project
npm ERR! peer framer-motion#"^2.9.4" from #chakra-ui/react#1.0.1
npm ERR! node_modules/#chakra-ui/react
npm ERR! #chakra-ui/react#"*" 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/travis/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/travis/.npm/_logs/2020-11-24T22_38_57_297Z-debug.log
With this command you can solve the problem:
npm i #chakra-ui/react --legacy-peer-deps
I had the same issue but in Vue. I ran the following commands and it started working:
vue create test -p default && cd test && vue serve src/main.js,
It seems like it created a folder running some tests.
Then I ran: npm i -g #vue/cli-service-global..
Then: npm run serve-- to initiate the vue server.
Hopefully it gives you an idea how to solve that in React.
Good luck!