angularangular-bootstrapangular13ngx-share

Angular 13 adding ngx-sharebuttons getting error like "Cannot find module '@angular/cdk/clipboard' or its corresponding type declarations."


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 enter image description here


Solution

  • 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: