Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editor.directive.d.ts:43:18 - error TS2707: Generic type 'ɵɵDirectiveDeclaration' requires between 6 and 8 type arguments. #542

Open
TomasKatz opened this issue Mar 18, 2024 · 2 comments

Comments

@TomasKatz
Copy link

TomasKatz commented Mar 18, 2024

After upgrading project to Angular 14.3.0 (core), I getting the folllowing errors when rnning "ng build":

Error: node_modules/angular-froala-wysiwyg/editor/editor.directive.d.ts:43:18 - error TS2707: Generic type 'ɵɵDirectiveDeclaration' requires between 6 and 8 type arguments.

43     static ɵdir: i0.ɵɵDirectiveDeclaration<FroalaEditorDirective, "[froalaEditor]", ["froalaEditor"], { "froalaEditor": "froalaEditor"; "froalaModel": "froalaModel"; }, { "froalaModelChange": "froalaModelChange"; "froalaInit": "froalaInit"; }, never, never, false, never>;
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/angular-froala-wysiwyg/view/view.directive.d.ts:10:18 - error TS2707: Generic type 'ɵɵDirectiveDeclaration' requires between 6 and 8 type arguments.

10     static ɵdir: i0.ɵɵDirectiveDeclaration<FroalaViewDirective, "[froalaView]", never, { "froalaView": "froalaView"; }, {}, never, never, false, never>;

This suggests a compatibility issue between the versions of Angular and angular-froala-wysiwyg in your project. The ɵɵDirectiveDeclaration is an internal Angular API, and the error indicates that the expected number of type arguments does not match what's provided by the angular-froala-wysiwyg directive declaration. This is often due to using a version of angular-froala-wysiwyg that is not compatible with your project's Angular version.

To resolve this I installed latest:
"angular-froala-wysiwyg": "^4.1.4"
"froala-editor": "^4.1.4",

tslib is ^2.3.1, angular-froala-wysiwyg requires 2.3.0, so I dont think this is an issue.

Updating did not resolve issue

PLEASE HELP

@SajeelBongaleNeogov
Copy link

Same issue
@angular/cli: 14.2.11
@angular/core: 14.3.0
angular-froala-wysiwyg: 4.2.0

@RytherS
Copy link

RytherS commented Sep 25, 2024

Just ran into this issue when migrating our app from Jasmine/Karma to Jest.
@angular/core: 14.3.0
angular-froala-wysiwyg: 4.1.4

The "solution" that ended up working for me was adding "skipLibCheck": true to our tsconfig.json file.

As far as I understand it, this option essentially tells Angular "don't worry, I know all the libs/deps will work together 😃😉", and it will skip type-checking when building.
Official docs with more info: https://www.typescriptlang.org/tsconfig/#skipLibCheck

I'm sure the real solution here is to upgrade Angular versions to at least 15, but if you're in a bind like me where that isn't an easy task, this could be a band-aid fix for ya.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants