Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not resolve dependency #34

Open
mohamadkhalil88 opened this issue Jan 21, 2022 · 4 comments
Open

Could not resolve dependency #34

mohamadkhalil88 opened this issue Jan 21, 2022 · 4 comments

Comments

@mohamadkhalil88
Copy link

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.

@ysrepo
Copy link

ysrepo commented Jan 25, 2022

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

@mohamadkhalil88
Copy link
Author

@gabrielbusarello any updates on your side?

@MixusMinimax
Copy link

MixusMinimax commented Feb 13, 2022

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.

@mm-pbr
Copy link

mm-pbr commented Sep 8, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants