ngu-carousel
ngu-carousel copied to clipboard
ERESOLVE unable to resolve dependency tree
Hi,
We were trying to update the package from version 2.1.0 to a version 3.0.2.
by changing the package.json to @ngu/carousel": "^3.0.2"
and running npm update @ngu/carousel
.
We got this error back:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"11.2.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^10.0.4" from @ngu/[email protected]
npm ERR! node_modules/@ngu/carousel
npm ERR! @ngu/carousel@"^3.0.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.
Here is our current package.json (before the update):
"dependencies": {
"@angular/animations": "11.2.5",
"@angular/cdk": "11.2.4",
"@angular/common": "11.2.5",
"@angular/compiler": "11.2.5",
"@angular/core": "11.2.5",
"@angular/flex-layout": "^10.0.0-beta.32",
"@angular/forms": "11.2.5",
"@angular/localize": "11.2.5",
"@angular/material": "11.2.4",
"@angular/platform-browser": "11.2.5",
"@angular/platform-browser-dynamic": "11.2.5",
"@angular/platform-server": "11.2.5",
"@angular/router": "11.2.5",
"@nestjs/common": "^7.6.12",
"@nestjs/config": "^0.6.3",
"@nestjs/core": "7.5.5",
"@nestjs/platform-express": "7.5.5",
"@ngrx/component-store": "11.0.0",
"@ngu/carousel": "^2.1.0",
"@nguniversal/express-engine": "11.2.1",
"@ngx-i18nsupport/tooling": "^8.0.3",
"@nrwl/angular": "11.5.1",
"angular-animations": "0.0.10",
"class-transformer": "^0.4.0",
"class-validator": "^0.13.1",
"compression": "^1.7.4",
"core-js": "^2.6.12",
"date-fns": "2.19.0",
"dotenv": "^6.2.0",
"express": "^4.17.1",
"hammerjs": "^2.0.8",
"ngx-date-fns": "^7.0.2",
"ngx-skeleton-loader": "2.9.1",
"reflect-metadata": "^0.1.13",
"rxjs": "6.5.5",
"tslib": "^2.0.0",
"zone.js": "^0.10.3"
}
It looks like the new version can only be installed on Angular 10, and not > Angular 10. While the version 2.1.0 works
Thanks
Apparently, if you install and build with Node v14, it works.
I'm getting the same issue as well and I've tried downgrading on node v14.18.2 same issue:
C:\Users\u288004\3D Objects\angular-11-13-upgrade-andrew\jlg-sources>npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"^13.1.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^12.2.0" from @ngu/[email protected]
npm ERR! node_modules/@ngu/carousel
npm ERR! @ngu/carousel@"^4.0.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\u288004\AppData\Local\npm-cache\eresolve-report.txt for a full report.
environment: node v16.13.1 Angular 13.1.1 npm v8.3.0 ngu/carousel v4.0.0
The only thing that worked for me to get it to work was npm install --legacy-peer-deps
but this shouldn't be a permanent solution and should be fixed.