I am getting error while doing "npm i ngx-slick-carousel --save"
My versions are:
$ npm -v
7.6.1
$ node -v
v14.17.0
Angular CLI: 11.2.13
Errors are :
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: irt-official@0.0.0
npm ERR! Found: @angular/common@11.2.14
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"~11.2.13" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^7.0.0 || ^8.0.0 || ^9.0.0" from ngx-slick-carousel@0.5.1
npm ERR! node_modules/ngx-slick-carousel
npm ERR! ngx-slick-carousel@"*" 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\malik\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\malik\AppData\Local\npm-cache\_logs\2021-05-19T14_13_57_035Z-debug.log
package.json:
"@angular/animations": "~11.2.13",
"@angular/common": "~11.2.13",
"@angular/compiler": "~11.2.13",
"@angular/core": "~11.2.13",
"@angular/forms": "~11.2.13",
"@angular/platform-browser": "~11.2.13",
"@angular/platform-browser-dynamic": "~11.2.13",
"@angular/router": "~11.2.13",
"angular-animations": "^0.11.0",
"jquery": "^3.6.0",
"rxjs": "~6.6.0",
"slick-carousel": "^1.8.1",
"tslib": "^2.0.0",
"zone.js": "~0.11.3"
Kindly help me with this issue. Why I am not able to install this.Thank you
UPDATE 1:
I have deleted node_module and packagelock.json file and tried to do "npm install" and I am getting this errors now
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: irt-official@0.0.0
npm ERR! Found: @angular/core@11.2.14
npm ERR! node_modules/@angular/core
npm ERR! @angular/core@"~11.2.13" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/core@"12.0.1" from @angular/animations@12.0.1
npm ERR! node_modules/@angular/animations
npm ERR! peer @angular/animations@">=6.0.0" from angular-animations@0.11.0
npm ERR! node_modules/angular-animations
npm ERR! angular-animations@"^0.11.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\malik\AppData\Local\npm-cache\eresolve-report.txt
for a full report.
UPDATE 2:
I have done "npm install --legacy-peer-deps" this command installed my node_module but when i do "ng serve" after installing i am getting this error
An unhandled exception occurred: The target entry-point "@angular/platform-browser/animations" has missing dependencies:
- @angular/animations
- @angular/animations/browser
UPDATE 3:
I have completely refreshed every thing like I have uninstalled node and angular cli and reinstalled
node version 16.2.0
npm -v: 7.6.1
Angular CLI: 12.0.1
Now i have created new project "ng new IRT-Official" Then Again i tried to do "npm install ngx-slick-carousel --save" Now i am getting this error.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: irt-official@0.0.0
npm ERR! Found: @angular/common@12.0.1
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"~12.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^7.0.0 || ^8.0.0 || ^9.0.0" from ngx-slick-carousel@0.5.1
npm ERR! node_modules/ngx-slick-carousel
npm ERR! ngx-slick-carousel@"*" 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
UPDATE 4:
I have manually added "ngx-slick-carousel": "0.5.1", in my packege.json file and then "npm install --legacy-peer-deps" it installed crousal but when i did all steps i am getting error like
Uncaught TypeError: $(...).owlCarousel is not a function