You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a bug where some routes hang, sometimes indefinitely. I've tried re-running dev, removing node_modules/ and .svelte-kit/, clearing browser cache, etc., but the problem persists.
If anyone would like to help, here's how to reproduce:
These routes keep hanging. And when they randomly load fine, clicking on the "upload image" doesn't pop up the file selection dialogue. However, when I build the app (npm run build) and preview (npm run preview), these routes work fine (now on port 4173).
I posted this issue in the Svelte server on Discord. You can read the discussion here.
The text was updated successfully, but these errors were encountered:
I added a src/hooks.server.ts file and it invokes the console.log() that I put in the handle hook. I also put a load function in the src/routes/app/onboarding/+page.server.ts file and its console.log() is also invoked. So, SvelteKit is actually receiving the requests, but is failing to respond.
I found a workaround for this: disabling SSR for the /app/onboarding/** routes during development:
With this, I have to reload the page 2x or 3x before the page is rendered, and this means I have to build for production locally if I want to test SSR behaviour. Not ideal! Really hope to find a better solution for this.
gyenabubakar
changed the title
Bug: Route hanging on dev server
Bug: Routes hanging on dev server
May 7, 2024
This seems to be a known issue and has been solved in this PR which is yet to merged. So, I've resorted to cloning that fork of Vite and linking it locally.
I'm now automating the linking steps:
📁 clone-vite.sh:
ROOT_DIR=$(pwd)
rm -rf .git-cloned/vite
git clone https://github.com/shYkiSto/vite.git .git-cloned/vite # added `.git-cloned` to `.gitignore`# shellcheck disable=SC2164cd .git-cloned/vite
git switch fix-ssr-deadlock
pnpm install --reporter=silent
pnpm run build
cd packages/vite && npm link
# go back to the root of the projectcd"$ROOT_DIR"||exit# replace all occurrences of `link:` with `file:` in the packages/vite/package.json files
bun use-file-protocol-in-vite.ts
npm link vite
I have a bug where some routes hang, sometimes indefinitely. I've tried re-running
dev
, removingnode_modules/
and.svelte-kit/
, clearing browser cache, etc., but the problem persists.If anyone would like to help, here's how to reproduce:
npm i
.npm run dev
. IMPORTANT: Don't open the URL in the browser just yet.—— http://localhost:5173/app/onboarding
—— http://localhost:5173/app/onboarding/profile
These routes keep hanging. And when they randomly load fine, clicking on the "upload image" doesn't pop up the file selection dialogue. However, when I build the app (
npm run build
) and preview (npm run preview
), these routes work fine (now on port4173
).I posted this issue in the Svelte server on Discord. You can read the discussion here.
The text was updated successfully, but these errors were encountered: