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

Render is Broken from Svelte 5 #157

Open
EricAndresen opened this issue Nov 19, 2024 · 4 comments
Open

Render is Broken from Svelte 5 #157

EricAndresen opened this issue Nov 19, 2024 · 4 comments

Comments

@EricAndresen
Copy link

As of 0.14.1 on Linux I get this error when trying to render a Svelte component in a LiveView template.

Component.render(...) is no longer valid in Svelte 5. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more information
Error: Component.render(...) is no longer valid in Svelte 5. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more information
    at Counter.render (/home/erandre7/development/no_code_monitoring/app/priv/svelte/server.js:2167:9)
    at render2 (/home/erandre7/development/no_code_monitoring/app/priv/svelte/server.js:2193:22)
    at getResponse (/home/erandre7/development/no_code_monitoring/app/deps/nodejs/priv/server.js:54:25)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Interface.onLine (/home/erandre7/development/no_code_monitoring/app/deps/nodejs/priv/server.js:63:33)

Solved by downgrading to Svelte 4 with npm i svelte@4 in the assets folder.

@woutdp
Copy link
Owner

woutdp commented Nov 19, 2024

0.14.1 doesn't support Svelte 5 yet. 0.15.0 will be the version that supports Svelte 5

@EricAndresen
Copy link
Author

To clarify I wasn't trying to install 5, I followed the instructions in the readme and Svelte 5 was installed, which crashed the application when I tried to run it. I think the npm scripts are installing Svelte 5 by default now that it's out of beta.

@woutdp
Copy link
Owner

woutdp commented Nov 19, 2024

Ah yes makes sense, I expect to release 0.15.0 soon so I'll leave it broken for now

@EricAndresen
Copy link
Author

Excited for the next release!

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