Napster2210 / ngx-spinner

A library for loading spinner for Angular 4 - 17.
https://napster2210.github.io/ngx-spinner/
MIT License
823 stars 138 forks source link

issue while build the typescript verion i use Version 5.1.3 and latest spinner when i build show error #262

Closed SALMANULFARIS-M closed 1 year ago

SALMANULFARIS-M commented 1 year ago

Error: node_modules/ngx-spinner/lib/ngx-spinner.component.d.ts:167:87 - error TS2344: Type '{ bdColor: { alias: "bdColor"; required: false; }; size: { alias: "size"; required: false; }; color: { alias: "color"; required: false; }; type: { alias: "type"; required: false; }; fullScreen: { alias: "fullScreen"; required: false; }; ... 4 more ...; disableAnimation: { ...; }; }' does not satisfy the constraint '{ [key: string]: string; }'. Property '"bdColor"' is incompatible with index signature. Type '{ alias: "bdColor"; required: false; }' is not assignable to type 'string'.

AfsalBaaqirA commented 1 year ago

I get the same error, Have you solved it?

Et3rnal commented 1 year ago

same

murmusandeep commented 1 year ago

Step 1 :- node_modules\ngx-spinner\lib\ngx-spinner.component.d.ts Step 2:- Open That file first and go to last line, it will show error Step 3:- "static ɵcmp: i0.ɵɵComponentDeclaration<NgxSpinnerComponent, "ngx-spinner", never, { "bdColor": string; "size": string; "color": string; "type": string; "fullScreen": string; "name": string; "zIndex": string; "template": string; "showSpinner": string; "disableAnimation": string; }, {}, never, ["*"], false, never>;" these code

wabudd1 commented 1 year ago

It looks like this is due to messed up npm dependencies. If you're running a version of Angular prior to 16.x, you'll need to manually install the appropriate version of ngx-spinner. For example, I'm on Angular 15.x so I ran npm install ngx-spinner@15.

Napster2210 commented 1 year ago

The ngx-spinner version should be based on the Angular version. You should use the desired version given in the ReadMe file.