Select to view content in your preferred language

test with calcite components: Cannot find module 'calcite-components'

02-20-2024 02:30 PM
New Contributor II

There is any way to run test (npm run test) when I am using calcite components in my widget?


I didnt´t found documentation about to handle this error. 

0 Kudos
1 Reply
Occasional Contributor

I was just looking at an issue with Calcite controls before and it doesn't look like 1.14 version that just released has it in the package.json

However, after adding it, And rebuilding/restarting I'm still not seeing controls like CalciteSelect CalciteInput render as they should in Experience Builder, which makes me wonder if EXB 1.14 is not configured out of the box somehow for this at a server and app level.  A lot of the examples for the design system seem to be designed for stand alone apps, that use the JS api not necessarily in Experience Builder.

Has anyone else run into these issues?


After doing a bit more digging, most of the examples say to import from 'calcite-components'

but 1.14 doesn't have a folder with that name in the client
The package.json only mentions 1 package: "@esri/calcite-components-react that npm needs to install which I don't think necessarily maps to /calcite-components naturally, although there is a jimu-ui/calcite-componenters folder in the root of the Client, with the way I expected imports to work I don't quiet get why /calcite-components would find it under jimu-ui/

And you will find that folder under dist.  it looks like they map it with a module alias in the webpack.common.js