froala / angular-froala-wysiwyg

Angular 4, 5, 6, 7, 8 and 9 plugin for Froala WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
732 stars 200 forks source link

An accessor cannot be declared in an ambient context #452

Open paddotk opened 3 years ago

paddotk commented 3 years ago

Angular v8 / Froala v3.2.5 / Not using Ionic

Hi, I ijust nstalled the module and followed all the instructions in the readme, but when I try to run my app (without applying froala to any div), the build fails, giving me the following errors:

WARNING in ./node_modules/froala-editor/css/froala_editor.pkgd.min.css (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/froala-editor/css/froala_editor.pkgd.min.css)
Module Warning (from ./node_modules/postcss-loader/src/index.js):
Warning

(7:52122) Replace fill-available to stretch, because spec had been changed

WARNING in ./node_modules/froala-editor/css/froala_editor.pkgd.min.css (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/froala-editor/css/froala_editor.pkgd.min.css)
Module Warning (from ./node_modules/postcss-loader/src/index.js):
Warning

(7:53558) Replace fill-available to stretch, because spec had been changed

WARNING in ./node_modules/froala-editor/css/froala_editor.pkgd.min.css (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/froala-editor/css/froala_editor.pkgd.min.css)
Module Warning (from ./node_modules/postcss-loader/src/index.js):
Warning

(7:54338) Replace fill-available to stretch, because spec had been changed

ERROR in node_modules/angular-froala-wysiwyg/editor/editor.directive.d.ts:21:9 - error TS1086: An accessor cannot be declared in an ambient context.

21     set froalaEditor(opts: any);
           ~~~~~~~~~~~~
node_modules/angular-froala-wysiwyg/editor/editor.directive.d.ts:23:9 - error TS1086: An accessor cannot be declared in an ambient context.

23     set froalaModel(content: any);
           ~~~~~~~~~~~
node_modules/angular-froala-wysiwyg/editor/editor.directive.d.ts:38:21 - error TS2694: Namespace '"c:/vitasgit/waardeer-en-doneer/src/BackOffice-Client/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDef'.

38     static ɵfac: i0.ɵɵFactoryDef<FroalaEditorDirective, never>;
                       ~~~~~~~~~~~~
node_modules/angular-froala-wysiwyg/view/view.directive.d.ts:7:9 - error TS1086: An accessor cannot be declared in an ambient context.

7     set froalaView(content: string);
          ~~~~~~~~~~
node_modules/angular-froala-wysiwyg/view/view.directive.d.ts:9:21 - error TS2694: Namespace '"c:/vitasgit/waardeer-en-doneer/src/BackOffice-Client/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDef'.

9     static ɵfac: i0.ɵɵFactoryDef<FroalaViewDirective, never>;

I don't get what these errors mean, but seemingly there are some references to non-existing Angular files or methods.

Any ideas why this might happen?

gojkov commented 3 years ago

I have this issue also - project using Angular 7

eopio commented 3 years ago

Same problem here with angular 8.2.14.

naive924 commented 2 years ago

I have this issue also - project using Angular 8