Install Kendo UI for Angular Editor Using Yarn
Environment
Product | Progress® Kendo UI® for Angular Editor |
Description
When I am trying to install the Kendo UI for Angular Editor using the Yarn package manager the application does not compile.
Cause
Using the Quick Setup with Angular CLI approach will automatically use the default package manager (npm
).
Yarn
, in comparison with npm
, has a different dependency resolution. In the discussed case, it fails to correctly resolve all Editor dependencies automatically.
Solution
Add a resolutions
field to your package.json
file, and define the correct ProseMirror package versions. Read more about the Selective dependency resolutions.
-
Run the following command to fetch the versions, specified by the
kendo-editor-common
package.shyarn info @progress/kendo-editor-common | grep prosemirror
The command will return a result, similar to the following (versions may vary).
sh'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'
-
Add the packages with their respective versions to the
resolutions
field in thepackage.json
file.ts"dependencies": { ... }, "devDependencies": { ... }, "resolutions": { "prosemirror-commands": "1.2.2", "prosemirror-history": "1.2.0", ... }