Sometimes, I get a really weird thing: I get an error 500 in sveltekit like:
with, in the browser, an error:
The next HMR update will cause the page to reloadSyntaxError: import not found: default
and I often get a list of modules that fail to import like Uncaught (in promise) TypeError: error loading dynamically imported module: http://localhost:51730/node_modules/@sveltejs/kit/src/runtime/client/entry.js
(this error vanishes on reload). For sure, this is not because of my code (checkout other commit still produce this error while they used to work just fine, cloning into another directory and restarting also fails)…
Last time, I managed to get rid of the error using some sort of cache cleaning, but I can't solve it today using the same trick… any idea what I get and how to fix this reliably?
If it helps, here is the html code of the page the browser receives:
<!doctype html><html lang="en"><head><meta charset="utf-8" /><link rel="icon" href="./favicon.png" /><meta name="viewport" content="width=device-width, initial-scale=1" /></head><body data-sveltekit-preload-data="hover" data-theme="skeleton"><div style="display: contents"><script> { __sveltekit_dev = { base: new URL(".", location).pathname.slice(0, -1), env: {} }; const element = document.currentScript.parentElement; Promise.all([ import("/node_modules/@sveltejs/kit/src/runtime/client/entry.js"), import("/@fs/home/leo/Documents/Informatique/Programmation/Projects/2024_03_sveltekit/.svelte-kit/generated/client/app.js") ]).then(([kit, app]) => { kit.start(app, element); }); }</script></div></body></html>