I get a error when calling the replaceState function due to Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '$set') in $effect
Reproduction
Create a sveltekit project using npm create svelte@latest (selected typescript and svelte 5).
Add the following code to src/routes/+page.svelte:
### Logs
```shell
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '$set')
in $effect
at replaceState (http://localhost:5173/node_modules/@sveltejs/kit/src/runtime/client/client.js?v=2d8c9736:1913:7)
at $effect (http://localhost:5173/src/routes/+page.svelte?t=1721223477430:21:3)
at update_reaction (http://localhost:5173/node_modules/.vite/deps/chunk-CZZRJ74Z.js?v=2d8c9736:1249:23)
at update_effect (http://localhost:5173/node_modules/.vite/deps/chunk-CZZRJ74Z.js?v=2d8c9736:1367:21)
at flush_queued_effects (http://localhost:5173/node_modules/.vite/deps/chunk-CZZRJ74Z.js?v=2d8c9736:1421:7)
at flush_queued_root_effects (http://localhost:5173/node_modules/.vite/deps/chunk-CZZRJ74Z.js?v=2d8c9736:1408:9)
at flush_sync (http://localhost:5173/node_modules/.vite/deps/chunk-CZZRJ74Z.js?v=2d8c9736:1528:7)
at flush_sync (http://localhost:5173/node_modules/.vite/deps/chunk-CZZRJ74Z.js?v=2d8c9736:1533:7)
at mount (http://localhost:5173/node_modules/.vite/deps/chunk-KL3U4IVS.js?v=2d8c9736:822:10)
at new Svelte4Component (http://localhost:5173/node_modules/.vite/deps/chunk-KL3U4IVS.js?v=2d8c9736:1012:70)TypeError: Cannot read properties of undefined (reading '$set')
in $effect
at replaceState (http://localhost:5173/node_modules/@sveltejs/kit/src/runtime/client/client.js?v=2d8c9736:1913:7)
at $effect (http://localhost:5173/src/routes/+page.svelte?t=1721223477430:21:3)
at update_reaction (http://localhost:5173/node_modules/.vite/deps/chunk-CZZRJ74Z.js?v=2d8c9736:1249:23)
at update_effect (http://localhost:5173/node_modules/.vite/deps/chunk-CZZRJ74Z.js?v=2d8c9736:1367:21)
at flush_queued_effects (http://localhost:5173/node_modules/.vite/deps/chunk-CZZRJ74Z.js?v=2d8c9736:1421:7)
at flush_queued_root_effects (http://localhost:5173/node_modules/.vite/deps/chunk-CZZRJ74Z.js?v=2d8c9736:1408:9)
at flush_sync (http://localhost:5173/node_modules/.vite/deps/chunk-CZZRJ74Z.js?v=2d8c9736:1528:7)
at flush_sync (http://localhost:5173/node_modules/.vite/deps/chunk-CZZRJ74Z.js?v=2d8c9736:1533:7)
at mount (http://localhost:5173/node_modules/.vite/deps/chunk-KL3U4IVS.js?v=2d8c9736:822:10)
at new Svelte4Component (http://localhost:5173/node_modules/.vite/deps/chunk-KL3U4IVS.js?v=2d8c9736:1012:70)
Describe the bug
When running the following code in
src/routes/+page.svelte
:I get a error when calling the
replaceState
function due toUncaught (in promise) TypeError: Cannot read properties of undefined (reading '$set') in $effect
Reproduction
npm create svelte@latest
(selected typescript and svelte 5).Add the following code to
src/routes/+page.svelte
:System Info
Severity
annoyance