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

Angular build fails with ckeditor - Getter and setter accessors do not agree in visibility. #316

Closed
awwwer opened this issue Apr 21, 2022 · 2 comments
Labels
resolution:resolved This issue was already resolved (e.g. by another ticket). type:question

Comments

@awwwer
Copy link

awwwer commented Apr 21, 2022

Hello all,

I tried to install ckeditor5-angular and ckeditor5-build-classic according to
https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/frameworks/angular.html .
When Building, I got the error message:

Error: node_modules/@types/ckeditor__ckeditor5-ui/src/editableui/editableuiview.d.ts:7:9 - error TS2379: Getter and setter accessors do not agree in visibility.

7     get _hasExternalElement(): boolean;
          ~~~~~~~~~~~~~~~~~~~

Error: node_modules/@types/ckeditor__ckeditor5-ui/src/editableui/editableuiview.d.ts:8:19 - error TS2379: Getter and setter accessors do not agree in visibility.

8     protected set _hasExternalElement(newValue: boolean);
                    ~~~~~~~~~~~~~~~~~~~

editableuiview.d.ts:

import { Locale } from "@ckeditor/ckeditor5-utils";
import View from "../view";

export default class EditableUIView extends View {
    isFocused: boolean;
    name: string;
    get _hasExternalElement(): boolean;
    protected set _hasExternalElement(newValue: boolean);

    constructor(locale: Locale, editingView: View, editableElement?: HTMLElement);
}

Now what I could do is remove the portected from the setter but this change will not be permanent since it is a generated file in node_modules.
How could I fix this error permanently?

Thank you in advance!

@pomek
Copy link
Member

pomek commented May 27, 2022

Hi, @awwwer,

Types provided by the @types/ckeditor__ckeditor5-ui package are not maintained by us. It might happen that they aren't up-to-date with CKEditor 5 API.

We're working on migrating the CKEditor 5 sources to TypeScript (see: ckeditor/ckeditor5#11704). Unfortunately, it is quite complex and requires a lot of time.

I'd consider disabling the type checking (if possible) for CKEditor 5 as types produced by the community may be incompatible with CKEditor 5 API.

@pomek pomek added the pending:feedback This issue is blocked by necessary feedback. label May 27, 2022
@awwwer
Copy link
Author

awwwer commented May 27, 2022

You are right. I have uninstalled the ckeditor types package and it was working. Thank you!

@FilipTokarski FilipTokarski added type:question resolution:resolved This issue was already resolved (e.g. by another ticket). and removed pending:feedback This issue is blocked by necessary feedback. labels May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:resolved This issue was already resolved (e.g. by another ticket). type:question
Projects
None yet
Development

No branches or pull requests

3 participants