i tried everything updated node angular restarted pc did all possible stuff but still get this error and i dont know why.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #ng-bootstrap/ng-bootstrap#13.0.0
npm ERR! Found: #angular/common#13.1.3
npm ERR! node_modules/#angular/common
npm ERR! #angular/common#"~13.1.1" from the root project
npm ERR! peer #angular/common#">=12.0.0" from #abp/ng.account.core#5.3.4
npm ERR! node_modules/#abp/ng.account.core
npm ERR! #abp/ng.account.core#"~5.3.4" from #abp/ng.account#5.3.4
npm ERR! node_modules/#abp/ng.account
npm ERR! #abp/ng.account#"~5.3.4" from the root project
npm ERR! #abp/ng.account.core#"~5.3.4" from #abp/ng.theme.basic#5.3.4
npm ERR! node_modules/#abp/ng.theme.basic
npm ERR! #abp/ng.theme.basic#"~5.3.4" from the root project
npm ERR! 9 more (#angular/cdk, #angular/forms, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/common#"^14.1.0" from #ng-bootstrap/ng-bootstrap#13.0.0
npm ERR! node_modules/#ng-bootstrap/ng-bootstrap
npm ERR! peer #ng-bootstrap/ng-bootstrap#">=10.0.0" from #abp/ng.components#5.3.4
npm ERR! node_modules/#abp/ng.components
npm ERR! #abp/ng.components#"~5.3.4" from the root project
npm ERR! 1 more (#abp/ng.setting-management)
npm ERR!
npm ERR! Conflicting peer dependency: #angular/common#14.1.3
npm ERR! node_modules/#angular/common
npm ERR! peer #angular/common#"^14.1.0" from #ng-bootstrap/ng-bootstrap#13.0.0
npm ERR! node_modules/#ng-bootstrap/ng-bootstrap
npm ERR! peer #ng-bootstrap/ng-bootstrap#">=10.0.0" from #abp/ng.components#5.3.4
npm ERR! node_modules/#abp/ng.components
npm ERR! #abp/ng.components#"~5.3.4" from the root project
npm ERR! 1 more (#abp/ng.setting-management)
npm ERR!
....
What I am doing wrong? I just downloaded abp framework code from internet and run npm install but ended with this. What should i do?
use the flag --legacy-peer-deps
npm install [package] --legacy-peer-deps
ng-bootstrap#13.0.0 has exactly one dependancy. It's tslib. Which version are you using? Maybe try to update that.
I found some github repo that says to use yarn instead of npm and it helps. Thank anyway :)
Try the following steps one by one
Remove node_modules folder and package-lock.json and run again
npm install
Or, try to clear npm cache
npm cache clean --force
Or, run the command with the --legacy-peer-deps option
npm install --legacy-peer-deps
Or, run the command with the --force option
npm install --force
Related
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
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 ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: angular-front-end#0.0.0
npm ERR! Found: jasmine-core#3.4.0
npm ERR! node_modules/jasmine-core
npm ERR! dev jasmine-core#"~3.4.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer jasmine-core#">=3.8" from karma-jasmine-html-reporter#1.7.0
npm ERR! node_modules/karma-jasmine-html-reporter
npm ERR! dev karma-jasmine-html-reporter#"^1.4.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\kurum\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\kurum\AppData\Local\npm-cache_logs\2022-06-25T12_48_31_942Z-debug-0.log
Package install failed, see above.
Remove your node_modules folder and package-lock.json first.
Then try this command:
npm install --legacy-peer-deps
This command tells NPM to ignore peer deps and proceed with the installation anyway.
Terminal
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency
tree npm ERR! npm ERR! While resolving: instalawnrn#0.0.1 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.0 ||
< 17.0" from react-native-maps#0.28.0 npm ERR!
node_modules/react-native-maps npm ERR! react-native-maps#"" from
the root project npm ERR! 2 more (react-native, react-native-web)
npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer
react#"17.0.2" from react-dom#17.0.2 npm ERR! node_modules/react-dom
npm ERR! peer react-dom#">=16.5.1" from react-native-web#0.11.7 npm
ERR! node_modules/react-native-web npm ERR! peer
react-native-web#"^0.11" from react-native-maps#0.28.0 npm ERR!
node_modules/react-native-maps npm ERR! react-native-maps#""
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\kcopu\AppData\Local\npm-cache\eresolve-report.txt for a full
report.
The package manager can determine whether or not react-native-maps will be installed. NPM does not work but you can install the package with yarn for example 'yarn add react-native-maps' will work instead of npm Install.
You can do
npm i --legacy-peer-deps
Node packages after this command will be installed perfectly!
I am the same issue.
If I install with this command
npm install react-native-maps --save-exact
not work... but with this command
expo install react-native-maps
works!!
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!