Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmdk-sv compiled shorthand store methods break in svelte@5.0.0-next.55+ #58

Closed
ndom91 opened this issue Feb 20, 2024 · 2 comments
Closed

Comments

@ndom91
Copy link

ndom91 commented Feb 20, 2024

Seems that Svelte 5 compiled output of cmdk-sv is broken as of next.55 :(

Looks like the change that broke things was introduced here: sveltejs/svelte#10477

I ran into this and while researching noticed someone else had already posted an issue related to this in the svelte repo. Copying their output below:

Repro

  1. Install svelte@5.0.0-next.55

  2. Attempt to use simple cmdk-sv example:

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

<Command.Root 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.Root>

Logs

✘ [ERROR] Invalid assignment target

    node_modules/.pnpm/cmdk-sv@0.0.13_svelte@5.0.0-next.55/node_modules/cmdk-sv/dist/cmdk/components/Command.svelte:82:30:
      82 │       $.mutate_store(stateStore, $.untrack($stateStore).value() = ...
         ╵                                  ^

9:12:20 PM [vite] error while updating dependencies:
Error: Build failed with 1 error:
node_modules/.pnpm/cmdk-sv@0.0.13_svelte@5.0.0-next.55/node_modules/cmdk-sv/dist/cmdk/components/Command.svelte:82:30: ERROR: Invalid assignment target
    at failureErrorWithLog (/home/httpswwwsveltelabdev-dcnb/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:1641:15)
    at eval (/home/httpswwwsveltelabdev-dcnb/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:1049:25)
    at eval (/home/httpswwwsveltelabdev-dcnb/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:1517:9)

CC: @zhihengGet

@huntabyte
Copy link
Owner

huntabyte commented Feb 20, 2024

Related: #10359 - we can't officially support anything Svelte 5 until its stable.

@ndom91 ndom91 closed this as completed Feb 20, 2024
@ndom91
Copy link
Author

ndom91 commented Feb 20, 2024

Fyi, I don't know if something old is cached, but it seems to be working again for me under next.64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants