-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
awaiting submitterneeds a reproduction, or clarificationneeds a reproduction, or clarification
Description
Describe the bug
When running SvelteKit in development mode, performing a soft reload (Ctrl+R or clicking refresh) causes the following error:
TypeError: can't access property "call", first_child_getter is undefined
get_first_child operations.js:89
from_html template.js:71
add_locations elements.js:15
Root root.svelte:68
effect2 hmr.js:50
update_reaction runtime.js:260
update_effect runtime.js:439
create_effect effects.js:124
branch effects.js:419
wrapper hmr.js:41
update_reaction runtime.js:260
update_effect runtime.js:439
create_effect effects.js:124
block effects.js:396
wrapper hmr.js:30
unmount2 render.js:228
...
Hard reload (Ctrl+Shift+R) works fine. The error only occurs on soft reload.
Additionally, after this error occurs, the page becomes completely unresponsive - no interactions (clicks, inputs, etc.) work until a hard reload is performed.
Reproduction
- Create a new SvelteKit project with Svelte 5
- Run
npm run dev - Open the app in browser
- Press Ctrl+R (soft reload) or click the refresh button
- Error appears in console
- Try to interact with the page - nothing works
Expected behavior
Soft reload should work without errors, same as hard reload. The page should remain interactive after reload.
Environment
- Svelte: 5.45.6
- SvelteKit: 2.49.1
- Vite: 7.2.6
- Browser: Firefox (also happens in Chrome)
- OS: macOS
Workaround
Setting hmr: false in vite.config.ts prevents the error but disables HMR entirely:
// vite.config.ts
export default defineConfig({
server: {
hmr: false
}
});Additional context
- The error originates from
operations.js:89in Svelte's internal DOM operations - Stack trace shows it's related to hydration during HMR
- Production build works fine - tested with
npm run build && npm run preview, no errors on soft reload - This is strictly a development mode issue
- Related issues:
Reproduction
Reproduction: Working on creating a minimal reproduction.
The issue occurs in a SvelteKit project using Svelte 5, Melt UI, and Paraglide.
Logs
System Info
System:
OS: macOS 15.6.1
CPU: (10) arm64 Apple M2 Pro
Memory: 113.48 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.12.0
npm: 11.6.2
bun: 1.3.1
Browsers:
Chrome: 143.0.7499.194
Firefox: 146.0.1
Safari: 18.6
npmPackages:
@sveltejs/kit: 2.49.5
svelte: 5.46.4
vite: 7.3.1Severity
annoyance
JDR42
Metadata
Metadata
Assignees
Labels
awaiting submitterneeds a reproduction, or clarificationneeds a reproduction, or clarification