MurhafSousli / ngx-scrollbar

Custom overlay-scrollbars with native scrolling mechanism
https://ngx-scrollbar.netlify.app/
MIT License
618 stars 99 forks source link

build error #519

Closed hashemi313 closed 1 year ago

hashemi313 commented 1 year ago

when i add NgScrollbarModule to my app.module i get this error while compile: Error: node_modules/ngx-scrollbar/lib/ng-scrollbar.d.ts:154:90 - error TS2344: Type '{ disabled: { alias: "disabled"; required: false; }; sensorDisabled: { alias: "sensorDisabled"; required: false; }; pointerEventsDisabled: { alias: "pointerEventsDisabled"; required: false; }; ... 14 more ...; scrollAuditTime: { ...; }; }' does not satisfy the constraint '{ [key: string]: string; }'.
Property '"disabled"' is incompatible with index signature. Type '{ alias: "disabled"; required: false; }' is not assignable to type 'string'.

154 static ɵcmp: i0.ɵɵComponentDeclaration<NgScrollbar, "ng-scrollbar", ["ngScrollbar"], { "disabled": { "alias": "disabled"; "required": false; }; "sensorDisabled": { "alias": "sensorDisabled"; "required": false; }; "pointerEventsDisabled": { "alias": "pointerEventsDisabled"; "required": false; }; "viewportPropagateMouseMove": { "alias": "viewportPropagateMouseMove"; "required": false; }; "autoHeightDisabled": { "alias": "autoHeightDisabled"; "required": false; }; "autoWidthDisabled": { "alias": "autoWidthDisabled"; "required": false; }; "viewClass": { "alias": "viewClass"; "required": false; }; "trackClass": { "alias": "trackClass"; "required": false; }; "thumbClass": { "alias": "thumbClass"; "required": false; }; "minThumbSize": { "alias": "minThumbSize"; "required": false; }; "trackClickScrollDuration": { "alias": "trackClickScrollDuration"; "required": false; }; "pointerEventsMethod": { "alias": "pointerEventsMethod"; "required": false; }; "track": { "alias": "track"; "required": false; }; "visibility": { "alias": "visibility"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "position": { "alias": "position"; "required": false; }; "sensorDebounce": { "alias": "sensorDebounce"; "required": false; }; "scrollAuditTime": { "alias": "scrollAuditTime"; "required": false; }; }, { "updated": "updated"; }, ["customViewPort"], ["*"], true, never>;

package.json

"@angular/animations": "^15.2.0",
"@angular/cdk": "^15.2.9",
"@angular/common": "^15.2.0",
"@angular/compiler": "^15.2.0",
"@angular/core": "^15.2.0",
"@angular/forms": "^15.2.0",
"@angular/material": "^15.2.9",
"@angular/platform-browser": "^15.2.0",
"@angular/platform-browser-dynamic": "^15.2.0",
"@angular/router": "^15.2.0",
"@ng-bootstrap/ng-bootstrap": "^14.2.0",
"@popperjs/core": "^2.11.6",
"@tinymce/tinymce-angular": "^7.0.0",
"bootstrap": "^5.3.1",
"bootstrap-icons": "^1.10.5",
"chart.js": "^3.1.1",
"keen-slider": "^6.8.6",
"mdb-angular-ui-kit": "^4.1.0",
"ngx-scrollbar": "^13.0.1",
"ngx-toastr": "16.2",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.12.0"
MurhafSousli commented 1 year ago

Version 11.0.0 is the latest working version for Angular 15, https://github.com/MurhafSousli/ngx-scrollbar/blob/master/CHANGELOG.md#1100

hashemi313 commented 1 year ago

I tried version 11.0.0 but the problem still exists

stephengardner commented 1 year ago

This occurs when you have strictTemplates on in angular. It's a problem in the module for sure. [disabled] is not being seen as an input on the component.