i am making a web site in angular 13 with using Bootstrap 5 Laravel api etc .Here i use a share social media button for my pages. when i install ngx-sharebuttons"and install npm successfully updated. but importing ngx-sharebuttons module in app.module.ts and input the ng serve i got error like this "Module build failed" i will share my error in below image.please help.i am new in agular
Asked
Active
Viewed 900 times
0

Rishf P
- 49
- 5
1 Answers
1
If you follow the guide on https://github.com/MurhafSousli/ngx-sharebuttons/wiki/Share-Button-Directive you see:
npm i ngx-sharebuttons @angular/cdk
This command installs @angular/cdk
alongside ngx-sharebuttons
. @angular/cdk
is a dependency of ngx-sharebuttons
. So in your case, try:
npm i @angular/cdk
and then serve your app again. The error should disappear.
Edit We figured out more things to keep an eye on within the discussion:
- make sure you install
@angular/cdk
to the same version as your other angular dependencies - make sure you use a compatible version of
ngx-sharebuttons
to your angular version. (v10 is for angular 13, v11 is for angular 14).

Riscie
- 3,775
- 1
- 24
- 31
-
i thinks its on the basis of material ?is it right? – Rishf P Sep 21 '22 at 06:57
-
I am not sure what you mean? – Riscie Sep 21 '22 at 06:58
-
actually here above link using angular material. I m using bootstrp.so how to combine each other? – Rishf P Sep 21 '22 at 06:59
-
I dont read anything about material. Do you mean `@angular/cdk`? – Riscie Sep 21 '22 at 07:02
-
yes i dont know about cdk – Rishf P Sep 21 '22 at 07:03
-
cdk is 'a set of behavior primitives for building UI components'. So it can be used by other component libraries like the one you want to use (ngx-sharebuttons). It does not stand directly in a connection to material. – Riscie Sep 21 '22 at 07:05
-
Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/248218/discussion-between-rishf-p-and-riscie). – Rishf P Sep 21 '22 at 07:08