Compile error while using kendo-react-dialogs

2 Answers 1447 Views
Dialog Window
anas
Top achievements
Rank 1
anas asked on 10 Nov 2022, 06:43 PM | edited on 10 Nov 2022, 06:45 PM

Hello,

I am trying to import the Window component from "kendo-react-dialogs", I am using exactly the same code from the window overview doc, I have the following error.

Compiled with problems:

ERROR in ../../.yarn/__virtual__/@progress-kendo-react-dialogs-virtual-8699855f90/3/AppData/Local/Yarn/Berry/cache/@progress-kendo-react-dialogs-npm-5.9.0-71dc4341df-8.zip/node_modules/@progress/kendo-react-dialogs/dist/es/WindowTitlebar.js 18:0-61

Module not found: Error: Can't resolve '@progress/kendo-react-intl' in 'C:\Users\belmekki\IdeaProjects\wps-9952\.yarn\__virtual__\@progress-kendo-react-dialogs-virtual-8699855f90\3\AppData\Local\Yarn\Berry\cache\@progress-kendo-react-dialogs-npm-5.9.0-71dc4341df-8.zip\node_modules\@progress\kendo-react-dialogs\dist\es'


ERROR in ../../.yarn/__virtual__/@progress-kendo-react-layout-virtual-e885d3475e/3/AppData/Local/Yarn/Berry/cache/@progress-kendo-react-layout-npm-5.9.0-3a7b59be14-8.zip/node_modules/@progress/kendo-react-layout/dist/es/tabstrip/TabStripNavigation.js 44:0-55

Module not found: Error: Can't resolve '@progress/kendo-react-buttons' in 'C:\Users\belmekki\IdeaProjects\wps-9952\.yarn\__virtual__\@progress-kendo-react-layout-virtual-e885d3475e\3\AppData\Local\Yarn\Berry\cache\@progress-kendo-react-layout-npm-5.9.0-3a7b59be14-8.zip\node_modules\@progress\kendo-react-layout\dist\es\tabstrip'

My kendo-react dependency list:

    "@progress/kendo-react-animation": "^5.9.0",
    "@progress/kendo-react-buttons": "^5.9.0",
    "@progress/kendo-react-dialogs": "^5.9.0",
    "@progress/kendo-react-intl": "^5.9.0",
    "@progress/kendo-react-layout": "^5.9.0",
    "@progress/kendo-react-progressbars": "^5.9.0",
    "@progress/kendo-theme-material": "^5.11.0",

For information I use react 18.2.0 with typescript version 4.4.2 and yarn as package manager, attached my react component which triggers the error.

2 Answers, 1 is accepted

Sort by
0
Filip
Telerik team
answered on 14 Nov 2022, 01:39 PM

Hi, Anas,

I inspected the provided file and the pasted package.json, however, the reason for this error is not apparent. I can recommend removing the node_modules using the rm -rf command and then performing a fresh new install. If this does not work can you try the same process but with NPM instead? 

In case this does not resolve your issue, can you provide an example that reproduces this error so that I can inspect further and see what might be causing this?

I hope this helps.

Regards,
Filip
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
ammak
Top achievements
Rank 1
Iron
answered on 14 Dec 2022, 01:56 PM | edited on 14 Dec 2022, 01:58 PM

You can solve the problem by adding the special declaration below inside yarnrc.yml  configuration file: 

"@progress/kendo-react-layout@5.9.0":
dependencies:
"@progress/kendo-react-buttons" : "5.9.0"
"@progress/kendo-react-dialogs@5.9.0":
peerDependencies:
"@progress/kendo-react-intl": "5.9.0"

 

Quoted from yarn official doc :

Some packages may have been specified incorrectly with regard to their dependencies - for example with one dependency being missing, causing Yarn to refuse it the access. The packageExtensions fields offer a way to extend the existing package definitions with additional information. If you use it, consider sending a PR upstream and contributing your extension to the plugin-compat database. Note: This field is made to add dependencies; if you need to rewrite existing ones, prefer the resolutions field.

Configuration options | Yarn - Package Manager (yarnpkg.com)

Tags
Dialog Window
Asked by
anas
Top achievements
Rank 1
Answers by
Filip
Telerik team
ammak
Top achievements
Rank 1
Iron
Share this question
or