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

TS2411: Property '[FONT_SIZE]' of type 'FontSizeCommand' is not assignable to 'string' index type 'Command' #404

Open
sergey-morenets opened this issue Jan 21, 2024 · 10 comments
Labels
pending:feedback This issue is blocked by necessary feedback.

Comments

@sergey-morenets
Copy link

Hi

We have Angular project with Ckeditor 5 dependency. Everything was working fine if we used the following versions:

    "@ckeditor/ckeditor5-angular": "^7.0.1",
    "@ckeditor/ckeditor5-core": "^40.2.0"

Once we upgraded "@ckeditor/ckeditor5-core" (and related Ckeditor dependencies) to 41.0.0 we got multiple errors during build, for example:

X [ERROR] TS2411: Property '[FONT_SIZE]' of type 'FontSizeCommand' is not assignable to 'string' index type 'Command'. [plugin angular-compiler]

    node_modules/@ckeditor/ckeditor5-font/src/augmentation.d.ts:53:8:
      53 │         [FONT_SIZE]: FontSizeCommand;

Angular: 17.1.0.

@Witoso
Copy link
Member

Witoso commented Jan 22, 2024

Hi! Could you provide more details about your setup? I checked quickly that the online builder folder next to the Angular's src still works with the version v41. Two things happened in v41, we resolved an issue with ESM in our packages, and bumped TS to 5.0.0.

@Witoso Witoso added the pending:feedback This issue is blocked by necessary feedback. label Jan 22, 2024
@sergey-morenets
Copy link
Author

Hi! Could you provide more details about your setup? I checked quickly that the online builder folder next to the Angular's src still works with the version v41. Two things happened in v41, we resolved an issue with ESM in our packages, and bumped TS to 5.0.0.

Hi @Witoso

Which information do you need? We use custom CkEditor build and the following dependencies now:

    "@ckeditor/ckeditor5-angular": "^7.0.1",
    "@ckeditor/ckeditor5-core": "^40.2.0",
    "@ckeditor/ckeditor5-engine": "^40.2.0",
    "@ckeditor/ckeditor5-utils": "^40.2.0",
    "@ckeditor/ckeditor5-watchdog": "^40.2.0",
    "ckeditor5-custom-build": "file:ckeditor",

@Witoso
Copy link
Member

Witoso commented Jan 22, 2024

Once we upgraded "@ckeditor/ckeditor5-core" (and related Ckeditor dependencies) to 41.0.0 we got multiple errors during build, for example:

What do you mean by build here? Is it a build command run in the ckeditor folder?

@sergey-morenets
Copy link
Author

No, it's our application build: ng build.

@Witoso
Copy link
Member

Witoso commented Jan 22, 2024

I don't see the @ckeditor/ckeditor5-font on the list of the deps you listed, how did it get there?

@sergey-morenets
Copy link
Author

Not sure. I'm not an expert in CKEditor

@Witoso
Copy link
Member

Witoso commented Jan 22, 2024

I cannot reproduce this error. Tried on StackBlitz, and everything works.

Unfortunately, without understanding of how your project is set up, it will be difficult to debug this.

@KevinMarques
Copy link

Same issue here, not only with FontSizeCommand but also with many other Commands:

...
node_modules/@ckeditor/ckeditor5-table/src/augmentation.d.ts
Property 'tableWidth' of type 'TableWidthCommand' is not assignable to 'string' index type 'Command'.
...

I think the problem is not specific to CKEditor v41.0.0 but to Angular 17.1

@Witoso
Copy link
Member

Witoso commented Jan 25, 2024

We cannot reproduce with v16 and v17, could you provide some minimal samples?

@benzara-tahar
Copy link

I had similar issue after updating to angular 17.1.3, adding "skipLibCheck": true, to tsconfig.json fixed it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending:feedback This issue is blocked by necessary feedback.
Projects
None yet
Development

No branches or pull requests

4 participants