huntabyte / cmdk-sv

cmdk, but for Svelte ✨
https://cmdk-sv.com
MIT License
424 stars 18 forks source link

SSR error during vite dev: `Export 'LoadingProps' is not defined` #4

Closed pheuter closed 8 months ago

pheuter commented 8 months ago

Code:

<script lang="ts">
    import { Command } from 'cmdk-sv';
</script>

<Command.Dialog label="Command Menu">
    <Command.Input />
    <Command.List>
        <Command.Empty>No results found.</Command.Empty>

        <Command.Group heading="Letters">
            <Command.Item>a</Command.Item>
            <Command.Item>b</Command.Item>
            <Command.Separator />
            <Command.Item>c</Command.Item>
        </Command.Group>

        <Command.Item>Apple</Command.Item>
    </Command.List>
</Command.Dialog>
Error: Parse failure: Export 'LoadingProps' is not defined (16:0)
At file: /node_modules/cmdk-sv/dist/cmdk/index.js
Contents of line 16: LoadingProps, DialogProps, CommandProps, EmptyProps, ItemProps, GroupProps, ListProps, InputProps, SeparatorProps };
    at ssrTransformScript (file:///node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55419:15)
    at ssrTransform (file:///node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55394:12)
    at Object.ssrTransform (file:///node_modules/vite/dist/node/chunks/dep-bb8a8339.js:65077:20)
    at loadAndTransform (file:///node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55065:24)
    at async instantiateModule (file:///node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55951:10)
huntabyte commented 8 months ago

Wow, really dropped the ball on that one! About to release a change that appears to fix this, but let me know if not!

pheuter commented 8 months ago

0.0.2 works!

buhodev commented 8 months ago

I had the same error testing one of the simple examples on the svelte repl :)