Open doroncy opened 4 years ago
With Angular 9.1 I am getting the following error: ERROR: node_modules/angular-froala-wysiwyg/editor/editor.directive.d.ts:37:18 - error TS2314: Generic type '??FactoryDef' requires 2 type argument(s).
37 static ?fac: ?ngcc0.??FactoryDef
node_modules/angular-froala-wysiwyg/view/view.directive.d.ts:9:18 - error TS2314
: Generic type '??FactoryDef' requires 2 type argument(s).
9 static ?fac: ?ngcc0.??FactoryDef<FroalaViewDirective>;
try to reinstall froala package again
npm install
npm install angular-froala-wysiwyg@latest
ng build --prod --aot
I have stuck with this error from three months and I'm not able to build my app for production so plz provide update and ETA.
I also ran into the same issue as @sheshnathverma. Both the FroalaEditorModule and FroalaViewModule need the generics added. In addition the FroalaEditorDirective imports Renderer which obviously no longer exists in @angular/core v9.x. I have tried to publish a fork with these three fixes, but IVY still doesn't appear to compile correctly with ngcc as I get the following error after making the above changes:
error NG6002: Appears in the NgModule.imports of FroalaModule, but could not be resolved to an NgModule class.
This likely means that the library (angular-froala-wysiwyg-ivy) which declares FroalaEditorModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
What is the roadmap for Angular 9 / Ivy support for angular-froala-wysiwyg?
You can see my changes which may fix the issue here:
https://github.com/blingerson/angular-froala-wysiwyg/commits/master
Same Issue here
FYI, version 2.9.8 works fine with Angular 9.1
@steve-tapley it does not work when IVY is enabled, it only works with angular 9 when IVY is disabled (which is non-default).
The three issues mentioned above prevent it from running with IVY enabled.
@blingerson We are using V2.9.8 in angular 9.1 with Ivy enabled. V2.9.6 and earlier did not support angular 9
@steve-tapley, v2.9.8 does not compile in our app. The bugs are still in the master branch:
public static forRoot(): ModuleWithProviders {
should be public static forRoot(): ModuleWithProviders<FroalaEditorModule> {
public static forRoot(): ModuleWithProviders {
should be public static forRoot(): ModuleWithProviders<FroalaViewModule> {
and it is currently throwing a type error.Perhaps you haven't check with the latest angular code? I can assure you that, in my situation, along with others here it definitely does not support angular 9. I got our app working by copying the directives and modules into our codebase and fixing the above issues. We are using angular 9.1.7.
@steve-tapley you may also want to check with:
import { ɵivyEnabled as ivyEnabled } from '@angular/core';
Many custom webpack configurations seem like ivy is enabled, but this "ivyEnabled" flag ends up being false. It should be true in both development and production mode. You may want to give it a sanity check to make sure it is truly enabled in your testcase.
@steve-tapley I have created a pull request with the pertinent changes:
https://github.com/froala/angular-froala-wysiwyg/pull/400
It is very possible that since we and others here are using custom webpack configurations that these issues could be due to different tsconfig or webpack loaders. Please consider this pull request to alleviate those issues in the cases where people are having issues. Thanks.
Any updates about this ?
It would be great to get the fixes in so we can remove our hacks and get this working with Angular 9. Is there anything I can do to help facilitate getting my pull request merged in?
any update on this?
Sorry for not circling back on this sooner, but I just removed my hack and installed v3.2.3 which has my pull request I believe. All is working fine and this issue seems like it can be closed. Thanks!
any update on this, i getting this error in angular 11 "angular-froala-wysiwyg": "^2.8.1",
When building a library with Angular 9, I get the following error
looks like the editor ModuleWithProviders does not contain a type definition.