-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
Getting a build time error:
Internal compiler error: let directive at invalid position. Please report this to https://github.com/sveltejs/svelte/issues
Plugin: vite-plugin-svelte
File: /home/kevin/source/repos/opensource/svelte-ux/packages/svelte-ux/src/lib/components/TreeList.svelte:25:53
25 | <li
26 | class={cls(
27 | typeof theme.li === 'string' ? theme.li : theme.li?.(node),
| ^
28 | typeof classes.li === 'string' ? classes.li : classes.li?.(node)
29 | )}
Reproduction
See this repo for an example.
Clone -> Run pnpm install -> cd into packages/svelte-ux -> pnpm dev
Experiance the fun!
Logs
/home/kevin/source/repos/opensource/svelte-ux/packages/svelte-ux/src/lib/components/TreeList.svelte:25:53 Internal compiler error: let directive at invalid position. Please report this to https://github.com/sveltejs/svelte/issues
/home/kevin/source/repos/opensource/svelte-ux/packages/svelte-ux/src/lib/components/TreeList.svelte:25:53 Internal compiler error: let directive at invalid position. Please report this to https://github.com/sveltejs/svelte/issues (x2)
11:25:34 AM [vite-plugin-svelte] /home/kevin/source/repos/opensource/svelte-ux/packages/svelte-ux/src/lib/components/ToggleOption.svelte:34:0 A11y: Non-interactive element <label> should not be assigned mouse or keyboard event listeners.
11:25:34 AM [vite] Internal server error: /home/kevin/source/repos/opensource/svelte-ux/packages/svelte-ux/src/lib/components/TreeList.svelte:25:53 Internal compiler error: let directive at invalid position. Please report this to https://github.com/sveltejs/svelte/issues
Plugin: vite-plugin-svelte
File: /home/kevin/source/repos/opensource/svelte-ux/packages/svelte-ux/src/lib/components/TreeList.svelte:25:53
25 | <li
26 | class={cls(
27 | typeof theme.li === 'string' ? theme.li : theme.li?.(node),
| ^
28 | typeof classes.li === 'string' ? classes.li : classes.li?.(node)
29 | )}
at error (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/svelte/src/compiler/errors.js:569:8)
at LetDirective (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/template.js:2766:4)
at next (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/zimmerframe/src/walk.js:106:21)
at _ (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/svelte/src/compiler/phases/scope.js:666:4)
at visit (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/zimmerframe/src/walk.js:100:13)
at Object.visit (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/zimmerframe/src/walk.js:86:20)
at serialize_inline_component (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/template.js:748:66)
at SvelteSelf (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/template.js:2730:21)
at next (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/zimmerframe/src/walk.js:106:21)
at _ (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/svelte/src/compiler/phases/scope.js:666:4)
11:25:36 AM [vite] Internal server error: /home/kevin/source/repos/opensource/svelte-ux/packages/svelte-ux/src/lib/components/TreeList.svelte:25:53 Internal compiler error: let directive at invalid position. Please report this to https://github.com/sveltejs/svelte/issues
Plugin: vite-plugin-svelte
File: /home/kevin/source/repos/opensource/svelte-ux/packages/svelte-ux/src/lib/components/TreeList.svelte:25:53
25 | <li
26 | class={cls(
27 | typeof theme.li === 'string' ? theme.li : theme.li?.(node),
| ^
28 | typeof classes.li === 'string' ? classes.li : classes.li?.(node)
29 | )}
at error (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/svelte/src/compiler/errors.js:569:8)
at LetDirective (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/template.js:2766:4)
at next (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/zimmerframe/src/walk.js:106:21)
at _ (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/svelte/src/compiler/phases/scope.js:666:4)
at visit (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/zimmerframe/src/walk.js:100:13)
at Object.visit (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/zimmerframe/src/walk.js:86:20)
at serialize_inline_component (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/template.js:748:66)
at SvelteSelf (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/template.js:2730:21)
at next (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/zimmerframe/src/walk.js:106:21)
at _ (file:///home/kevin/source/repos/opensource/svelte-ux/node_modules/.pnpm/[email protected]/node_modules/svelte/src/compiler/phases/scope.js:666:4) (x2)
System Info
Linux Mint
Brave Browser
Severity
blocking an upgrade
Metadata
Metadata
Assignees
Labels
No labels