kendo-angular-editor not working after upgrade

2 Answers 1036 Views
Editor
Olivier
Top achievements
Rank 1
Iron
Olivier asked on 14 Jun 2022, 10:00 AM

Hi,

I just upgraded my project to Angular 14, with node 14. Project does not compile anymore. If I remove reference to kendo-angular-editor, it is working fine.

Error is coming from Prosemirror libraries, that are dependencies of kendo-angular-editor.

2 Answers, 1 is accepted

Sort by
0
Accepted
Olivier
Top achievements
Rank 1
Iron
answered on 17 Jun 2022, 09:25 AM | edited on 17 Jun 2022, 09:26 AM

Thanks anyway, at least I can compile. Could you please take in consideration that a lot of users are using yarn despite of npm please ?

For people that came here through search engine, solution that worked in my case was using NPM.

Have a nice day.

0
Yanmario
Telerik team
answered on 17 Jun 2022, 06:10 AM

Hi Olivier,

The Kendo UI for Angular Editor v4.0.0(or latest) is compatible with Angular v14. I would recommend updating our components to their latest version:

https://www.telerik.com/kendo-angular-ui/components/installation/up-to-date/

A project will be also attached with the latest version of the Editor and Angular.

I hope this helps.

Regards,
Yanmario
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Olivier
Top achievements
Rank 1
Iron
commented on 17 Jun 2022, 07:29 AM

This is exactly what I did and that lead me to this issue :).

yarn upgrade-interactive => it updated both kendo and angular as expected.

But then with yarn start, it shows a bunch of errors like :

ERROR

node_modules/@types/prosemirror-commands/index.d.ts:36:21 - error TS2315: Type 'Transaction' is not generic. 36 dispatch?: (tr: Transaction<S>) => void,
Martin
Telerik team
commented on 17 Jun 2022, 08:02 AM

Hi Olivier,

Yarn, in comparison with npm (default package manager), has a different dependency resolution and in this particular case, it fails to correctly resolve all of the Editor's dependencies automatically.

In scenarios like that, what could be done is to use yarn's resolutions, and list the prosemirror packages in the package.json file even if they are not directly used in the application.

https://classic.yarnpkg.com/en/docs/selective-version-resolutions/

Running the following command:

yarn info @progress/kendo-editor-common | grep prosemirror

will produce something similar to:

 'prosemirror-commands': '1.2.2',
    'prosemirror-history': '1.2.0',
    'prosemirror-inputrules': '1.1.3',
    'prosemirror-keymap': '1.1.5',
    'prosemirror-model': '1.16.1',
    'prosemirror-schema-list': '1.1.6',
    'prosemirror-state': '1.3.4',
    'prosemirror-view': '1.23.12',
    'prosemirror-dropcursor': '1.4.0',
    'prosemirror-gapcursor': '1.2.2',
    'prosemirror-tables': '1.1.1',
    'prosemirror-transform': '1.4.2',
    '@types/prosemirror-commands': '1.0.4',
    '@types/prosemirror-history': '1.0.3',
    '@types/prosemirror-inputrules': '1.0.2',
    '@types/prosemirror-keymap': '1.0.2',
    '@types/prosemirror-model': '1.16.1',
    '@types/prosemirror-schema-list': '1.0.3',
    '@types/prosemirror-state': '1.2.4',
    '@types/prosemirror-view': '1.11.4',
    '@types/prosemirror-dropcursor': '1.0.3',
    '@types/prosemirror-gapcursor': '1.0.4',
    '@types/prosemirror-transform': '1.1.6'
Adding them to the resolution list in packages.json should be enough

 

 

Olivier
Top achievements
Rank 1
Iron
commented on 17 Jun 2022, 09:23 AM | edited

I added packages, but errors still there (in fact it is worse). Using npm did the trick, but it is more like a workaround than a solution because we don't use npm anyumore for years now :).
Tags
Editor
Asked by
Olivier
Top achievements
Rank 1
Iron
Answers by
Olivier
Top achievements
Rank 1
Iron
Yanmario
Telerik team
Share this question
or