You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried to add runed to my project using Svelte 5, but getting an error:
ERROR in ./node_modules/.pnpm/runed@0.28.0_svelte@5.34.3/node_modules/runed/dist/utilities/state-history/state-history.svelte.js
Module build failed (from ./node_modules/.pnpm/svelte-loader@3.2.4_svelte@5.34.3/node_modules/svelte-loader/index.js):
Error: CompileError: state_invalid_placement: `$state(...)` can only be used as a variable declaration initializer, a class field declaration, or the first assignment to a class field at the top level of the constructor.
https://svelte.dev/e/state_invalid_placement
node_modules/.pnpm/runed@0.28.0_svelte@5.34.3/node_modules/runed/dist/utilities/state-history/state-history.svelte.js:12:25
10: #ignoreUpdate = false;
11: #set;
12: __init() {this.log = $state([])}
^
13: __init2() {this.canUndo = $derived(this.log.length > 1)}
14: __init3() {this.canRedo = $derived(this.#redoStack.length > 0)}
at module.exports (/mnt/data/srv/dist/web/public/themes/vedisoft/client/node_modules/.pnpm/svelte-loader@3.2.4_svelte@5.34.3/node_modules/svelte-loader/index.js:107:13)
@ ./node_modules/.pnpm/runed@0.28.0_svelte@5.34.3/node_modules/runed/dist/utilities/state-history/index.js 1:0-42 1:0-42
@ ./node_modules/.pnpm/runed@0.28.0_svelte@5.34.3/node_modules/runed/dist/utilities/index.js 18:0-41 18:0-41
@ ./node_modules/.pnpm/runed@0.28.0_svelte@5.34.3/node_modules/runed/dist/index.js 1:0-37 1:0-37
@ ./src/js/modules/bkp/models/Default/views/List.svelte 6:0-30 62:1-6
@ ./src/js/modules/bkp/models/Default/Router.svelte 7:0-39 34:3-7
@ ./src/js/modules/bkp/App.svelte 4:0-52 124:5-18
@ ./src/js/modules/bkp/index.js 2:0-31 8:8-11
@ ./src/js/types/bkp.js 2:0-24
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Tried to add runed to my project using Svelte 5, but getting an error:
Is there a way to fix it?
Beta Was this translation helpful? Give feedback.
All reactions