looker-open-source/components

"Theme" no matching export from @looker/design-tokens

Closed this issue · 1 comments

Hello, I'm trying to render some UI elements in my react application using the @looker/components library. It appears that "Theme"'s export from "node_modules/@looker/design-tokens/lib/module/index.js" was not found. More specifically, the @looker/components package exports "Theme" from @looker/design-tokens. In order to do so, it should first import that interface before exporting it, but it is unable to locate a compatible export from @looker/design-tokens package.

`
"@looker/components": "^4.1.3",
"@looker/components-data": "^1.0.3",
"@looker/embed-sdk": "^1.8.4",
"@looker/filter-components": "^1.0.3",
"@looker/sdk": "^23.10.0",
"@looker/sdk-node": "^23.10.0",
"@looker/sdk-rtl": "^21.6.1",
"@looker/visualizations": "^1.1.4",
"@looker/visualizations-adapters": "^1.0.3",

`
These are package versions that I'm using. All of them are latest stable versions according to npm.
Here are dependensios of @looker/component v4.1.3 lib:

`
"dependencies": {
"@looker/components-providers": "^1.5.31",
"@looker/design-tokens": "^3.1.1",
"@looker/i18n": "^1.0.0",
"@popperjs/core": "^2.6.0",
"@styled-icons/material": "10.34.0",
"@styled-icons/material-outlined": "10.34.0",
"@styled-icons/material-rounded": "10.34.0",
"@styled-icons/styled-icon": "^10.6.3",
"d3-color": "3.1.0",
"d3-hsv": "^0.1.0",
"date-fns": "^2.10.0",
"date-fns-tz": "^1.0.12",
"i18next": "20.3.1",
"react-i18next": "11.8.15",
"uuid": "*"
},

`
As can be seen, the @looker/components v4.1.3 package uses the @looker/design-tokens v3.1.1 library, which npm lists as the most recent stable version.

The error:
image

Is there a workaround or a future potential fix?
Thank you ahead of time.

It appears that Vite was the issue. The identical problem does not appear in React apps produced with CRA.