Angular 使用 ckeditor 构建失败 - Getter 和 setter 访问者在可见性方面不一致

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

我尝试根据安装ckeditor5-angular和ckeditor5-build-classic https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/frameworks/angular.html。 构建时,我收到错误消息:

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);
}

现在我可以做的是从 setter 中删除 portected 但此更改不会是永久性的,因为它是 node_modules.

中生成的文件

我已经创建了一个 typings.d.ts 文件,推荐这里:

如何永久修复此错误?

提前致谢!

我找到了一个解决方案:我已经卸载了 ckeditor 的类型包,之后它在没有它的情况下也能正常工作。