Skip to content

Svelte 5 (alpha 62) nukes my SvelteKit app in DEV 💣 #10573

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

Closed
svelte-kit-so-good opened this issue Feb 20, 2024 · 9 comments · Fixed by #10577
Closed

Svelte 5 (alpha 62) nukes my SvelteKit app in DEV 💣 #10573

svelte-kit-so-good opened this issue Feb 20, 2024 · 9 comments · Fixed by #10577
Labels
awaiting submitter needs a reproduction, or clarification

Comments

@svelte-kit-so-good
Copy link

svelte-kit-so-good commented Feb 20, 2024

Describe the bug

Title says it all ... but here is a video

  • video starts with working case (alpha 61) and breaks with upgrade to alpha 62 (in dev ... works in prod)
pnpm_dev_alpha62_nukes_app.mp4

Reproduction

See video attached

Logs

No response

System Info

Svelte v5.0.0-next.62 (breaks)
Svelte v5.0.0-next.61 (works)

Severity

annoyance

@trueadm
Copy link
Contributor

trueadm commented Feb 20, 2024

Which was the last version that worked?

@svelte-kit-so-good
Copy link
Author

@trueadm alpha 61. Should've clarified but in the video I start with alpha 61 and it works. Upgrading to svelte@next moves to alpha 62 ... and breaks the app.

@Conduitry Conduitry added the awaiting submitter needs a reproduction, or clarification label Feb 20, 2024
@trueadm
Copy link
Contributor

trueadm commented Feb 20, 2024

@svelte-kit-so-good Can you try in a prod build? I'm wondering if this is related to #10464

@stolinski
Copy link

stolinski commented Feb 20, 2024

I am seeing this exact same error on v62 in a SK2 app. Trying a prod build now.

Edit: Running pnpm build & preview does work as expected. Only dev broken with the mismatch, filename error OP showed above.

@svelte-kit-so-good
Copy link
Author

@stolinski yea I just checked ... it breaks with pnpm dev only in alpha 62. Using pnpm build works

@svelte-kit-so-good
Copy link
Author

@svelte-kit-so-good Can you try in a prod build? I'm wondering if this is related to #10464

Just updated the video showing that alpha 62 works with prod but breaks in dev 👍

@svelte-kit-so-good svelte-kit-so-good changed the title Svelte 5 (alpha 62) nukes my app 💣 Svelte 5 (alpha 62) nukes my app 💣 (in DEV) Feb 20, 2024
@Rich-Harris
Copy link
Member

So we know where the error is — it's here:

if (component && !owners.has(component)) {
let original = [...owners][0];
let message =
// @ts-expect-error
original.filename !== component.filename
? // @ts-expect-error
`${component.filename} mutated a value owned by ${original.filename}. This is strongly discouraged`
: 'Mutating a value outside the component that created it is strongly discouraged';

What I don't understand yet is how we could wind up in that state, because owners should always have at least one member. If anyone is able to create a minimal repro that would be very helpful

@Conduitry
Copy link
Member

sveltejs/kit#11878 Supposedly it's happening with a fresh SvelteKit project.

@svelte-kit-so-good svelte-kit-so-good changed the title Svelte 5 (alpha 62) nukes my app 💣 (in DEV) Svelte 5 (alpha 62) nukes my SvelteKit app in DEV 💣 Feb 20, 2024
@JLAcostaEC
Copy link

sveltejs/kit#11878 Supposedly it's happening with a fresh SvelteKit project.

Same error here, right after updating to next63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting submitter needs a reproduction, or clarification
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants