material2-carousel
material2-carousel copied to clipboard
Could not resolve dependency
i am receiving this error when running npm i (Angular 13):
While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/material
npm ERR! @angular/material@"13.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/material@"^10.0.1" from @ngbmodule/[email protected]
npm ERR! node_modules/@ngbmodule/material-carousel
npm ERR! @ngbmodule/material-carousel@"0.7.2" from the root project
i had to use --force to make it work temporary, it is better to be fixed from package itself.
I have the same even with 11th version
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/material
npm ERR! @angular/material@"^11.2.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/material@"^10.0.1" from @ngbmodule/[email protected]
npm ERR! node_modules/@ngbmodule/material-carousel
npm ERR! @ngbmodule/material-carousel@"^0.7.1" from the root project
I wonder how did it work before, because it did, but anyway, after NodeJS reinstallation I have this error. Maybe someone has already met and has resolved such confuse, thanks
@gabrielbusarello any updates on your side?
It's the typescript module description. Change the import to
import { ModuleWithProviders } from '@angular/core';
and change the forRoot()
Line to
static forRoot(): (ModuleWithProviders<MatCarouselModule>)&{ngModule:MatCarouselModule};
More on this here: https://angular.io/guide/migration-module-with-providers
This worked when I made these changes in node_modules. However, the module descriptor is probably automatically generated, so changes would have to be made in projects/carousel/src/lib/carousel.module.ts
.
it helps locally but I need it fixed in the ngbmodule/material carousel because when I build my docker image or run a pipeline in Azure the error is still there :( When will it be fixed?