hperrin / svelte-material-ui

Svelte Material UI Components
https://sveltematerialui.com/
Apache License 2.0
3.28k stars 288 forks source link

CommonIcon #524

Open Zahara-Nour opened 1 year ago

Zahara-Nour commented 1 year ago

While using an Icon from @smui/common :

Cannot read properties of null (reading 'SmuiElement') TypeError: Cannot read properties of null (reading 'SmuiElement') at CommonIcon.svelte:33:32

Seems that there is an error with the extension of the index file

from CommonIcon.svelte import { SmuiElement, Svg } from './index.js';

whereas there is an index.ts file in the same directory.

jboornlp commented 1 year ago

Getting what appears to be same issue on CommonLabel (v7.0.0-beta.0)

raythurnvoid commented 1 year ago

This is impeding usage in svelte-kit with ssr crashing because of this.

jdgamble555 commented 1 year ago

This is a huge issue. At this point I am going to have to find another UI Framework. There doesn't seem to be much progress for SSR, the documentation is non-existent, and this the norms are all over the place.

hperrin commented 1 year ago

This is explicitly what the TypeScript documentation tells you to do. What kind of setup do you have that's causing this issue? I'm using SMUI in SvelteKit and I'm not getting this error. The demo site is built with SvelteKit, and it's all prerendered with SSR, so it's likely that this is caused by a configuration issue.