Select to view content in your preferred language

Vite + React + Calcite-components-react - errors during load

1861
4
Jump to solution
08-26-2023 03:07 AM
AlexRyzhov
New Contributor

I am trying to use @esri/calcite-components-react with Vite + React.
I'v created some basic app with "npm create vite@latest" command , installed @esri/calcite-components-react and copied calcite components code from sample repo (https://github.com/Esri/calcite-components-examples/tree/master/react).

Everything is working as expected, but there are 100 error in console during the loading process like this:
 Uncaught (in promise) TypeError: Failed to resolve module specifier '@esri/calcite-components/dist/components/calcite-accordion.js'

I'v created repo with my sample https://github.com/AlexanderRyzhov/vite-react-calcite

Steps to reproduce the problem:
1. clone the repo
2. run "npm install"
3. run "npm run dev"
Open  http://localhost:5174/ in a browser and open devTools - there should be erros during loading.

Can anyone help me to fix this problem?

 

0 Kudos
1 Solution

Accepted Solutions
KittyHurley
Esri Contributor

@AlexRyzhov The issue has been mitigated in this week's 1.8.0 release.

View solution in original post

0 Kudos
4 Replies
KittyHurley
Esri Contributor

Hi @AlexRyzhov, this is a regression bug introduced in 1.5.0. There is a planned fix in the upcoming 1.7.0 release, targeted for release in the next week. In the meantime the 1.4.3 release will provide no errors. Can update this issue as soon as 1.7.0 is available for use, and apologies for the inconvenience.

0 Kudos
KittyHurley
Esri Contributor

The regression was not mitigated in the 1.7.0 release yesterday. Additional research is planned in the effort, and Calcite is working towards a fix in the near future.

0 Kudos
KittyHurley
Esri Contributor

@AlexRyzhov The issue has been mitigated in this week's 1.8.0 release.

0 Kudos
andreamangeruca
Occasional Contributor

I have the same problem with @esri/calcite-components-exemple/vue.

on the console I see many warn like this:

[Vue warn]: Failed to resolve component: calcite-icon If this is a native custom element, make sure to

exclude it from component resolution via compilerOptions.isCustomElement.

 

Could you please help me?

Many thanks