Closed SALMANULFARIS-M closed 1 year ago
I get the same error, Have you solved it?
same
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
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
.
The ngx-spinner version should be based on the Angular version. You should use the desired version given in the ReadMe file.
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'.