zefoy / ngx-color-picker

Color picker widget for the Angular (version 2 and newer)
MIT License
454 stars 142 forks source link

Getting error 'Generic type 'ɵɵComponentDeclaration' requires between 7 and 8 type arguments.' #332

Open hrghauri opened 1 year ago

hrghauri commented 1 year ago

Hi folks, I am trying to use this library. However, I am getting the following error when I tried to import ColorPickerModule in my AppModule

Error: node_modules/ngx-color-picker/lib/color-picker.component.d.ts:183:18 - error TS2707: Generic type 'ɵɵComponentDeclaration' requires between 7 and 8 type arguments.

183     static ɵcmp: i0.ɵɵComponentDeclaration<ColorPickerComponent, "color-picker", never, {}, {}, never, never, false, never>;

Error: node_modules/ngx-color-picker/lib/color-picker.directive.d.ts:108:18 - error TS2707: Generic type 'ɵɵDirectiveDeclaration' requires between 6 and 8 type arguments.

108     static ɵdir: i0.ɵɵDirectiveDeclaration<ColorPickerDirective, "[colorPicker]", ["ngxColorPicker"], { "colorPicker": "colorPicker"; "cpWidth": "cpWidth"; "cpHeight": "cpHeight"; "cpToggle": "cpToggle"; "cpDisabled": "cpDisabled"; "cpIgnoredElements": "cpIgnoredElements"; "cpFallbackColor": "cpFallbackColor"; "cpColorMode": "cpColorMode"; "cpCmykEnabled": "cpCmykEnabled"; "cpOutputFormat": "cpOutputFormat"; "cpAlphaChannel": "cpAlphaChannel"; "cpDisableInput": "cpDisableInput"; "cpDialogDisplay": "cpDialogDisplay"; "cpSaveClickOutside": "cpSaveClickOutside"; "cpCloseClickOutside": "cpCloseClickOutside"; "cpUseRootViewContainer": "cpUseRootViewContainer"; "cpPosition": "cpPosition"; "cpPositionOffset": "cpPositionOffset"; "cpPositionRelativeToArrow": "cpPositionRelativeToArrow"; "cpOKButton": "cpOKButton"; "cpOKButtonText": "cpOKButtonText"; "cpOKButtonClass": "cpOKButtonClass"; "cpCancelButton": "cpCancelButton"; "cpCancelButtonText": "cpCancelButtonText"; "cpCancelButtonClass": "cpCancelButtonClass"; "cpEyeDropper": "cpEyeDropper"; "cpPresetLabel": "cpPresetLabel"; "cpPresetColors": "cpPresetColors"; "cpPresetColorsClass": "cpPresetColorsClass"; 
"cpMaxPresetColorsLength": "cpMaxPresetColorsLength"; "cpPresetEmptyMessage": "cpPresetEmptyMessage"; "cpPresetEmptyMessageClass": "cpPresetEmptyMessageClass"; "cpAddColorButton": 
"cpAddColorButton"; "cpAddColorButtonText": "cpAddColorButtonText"; "cpAddColorButtonClass": "cpAddColorButtonClass"; "cpRemoveColorButtonClass": "cpRemoveColorButtonClass"; "cpArrowPosition": "cpArrowPosition"; "cpExtraTemplate": "cpExtraTemplate"; }, { "cpInputChange": "cpInputChange"; "cpToggleChange": "cpToggleChange"; "cpSliderChange": "cpSliderChange"; "cpSliderDragEnd": "cpSliderDragEnd"; "cpSliderDragStart": "cpSliderDragStart"; "colorPickerOpen": "colorPickerOpen"; "colorPickerClose": "colorPickerClose"; "colorPickerCancel": 
"colorPickerCancel"; "colorPickerSelect": "colorPickerSelect"; "colorPickerChange": "colorPickerChange"; "cpCmykColorChange": "cpCmykColorChange"; "cpPresetColorsChange": "cpPresetColorsChange"; }, never, never, false, never>;

Error: node_modules/ngx-color-picker/lib/helpers.d.ts:22:18 - error TS2707: Generic type 'ɵɵDirectiveDeclaration' requires between 6 and 8 type arguments.

22     static ɵdir: i0.ɵɵDirectiveDeclaration<TextDirective, "[text]", never, { "rg": "rg"; "text": "text"; }, { "newValue": "newValue"; }, never, never, false, never>;

Error: node_modules/ngx-color-picker/lib/helpers.d.ts:44:18 - error TS2707: Generic type 'ɵɵDirectiveDeclaration' requires between 6 and 8 type arguments.

44     static ɵdir: i0.ɵɵDirectiveDeclaration<SliderDirective, "[slider]", never, { "rgX": "rgX"; "rgY": "rgY"; "slider": "slider"; }, { "dragEnd": "dragEnd"; "dragStart": "dragStart"; "newValue": "newValue"; }, never, never, false, never>;

Some information:

Does anyone know what could be the reason?

ArthurFleao commented 1 year ago

I'm facing the same issue with:

Renhj90520 commented 1 year ago

Angular version: 14.2.0 "ngx-color-picker": "^13.0.0"

works fine

neolee6053 commented 1 year ago

Same issue here Angular Version : 14.2.10 "ngx-color-picker": "^13.0.0"