houdini icon indicating copy to clipboard operation
houdini copied to clipboard

Hot reloading broken: Cannot access 'QueryStore' before initialization

Open m1212e opened this issue 6 months ago • 1 comments

Describe the bug

Hey, when using Houdini my app breaks when it tries to perform a hot reload after changing something. I always have to restart the dev server. This is the error:

Cannot access 'QueryStore' before initialization

ReferenceError: Cannot access 'QueryStore' before initialization
    at Module.get [as QueryStore] (/myproject/$houdini/plugins/houdini-svelte/runtime/stores/query.js:3:119)
    at eval (/myproject/$houdini/plugins/houdini-svelte/stores/OfflineUser.js:9:42)
    at async ESModulesEvaluator.runInlinedModule (file:///myproject/node_modules/vite/dist/node/module-runner.js:1062:5)
    at async SSRCompatModuleRunner.directRequest (file:///myproject/node_modules/vite/dist/node/module-runner.js:1284:61)
    at async SSRCompatModuleRunner.directRequest (file:///myproject/node_modules/vite/dist/node/chunks/dep-BMIURPaQ.js:25274:23)
    at async SSRCompatModuleRunner.cachedRequest (file:///myproject/node_modules/vite/dist/node/module-runner.js:1180:76)
    at async eval (/myproject/src/lib/queries/fastUserQuery.ts:1:1)
    at async ESModulesEvaluator.runInlinedModule (file:///myproject/node_modules/vite/dist/node/module-runner.js:1062:5)
    at async SSRCompatModuleRunner.directRequest (file:///myproject/node_modules/vite/dist/node/module-runner.js:1284:61)
    at async SSRCompatModuleRunner.directRequest (file:///myproject/node_modules/vite/dist/node/chunks/dep-BMIURPaQ.js:25274:23

m1212e avatar Jun 11 '25 17:06 m1212e

This should be fixed in the @next version - mind trying that out? it will require bumping you vite to v6 if you haven't already

AlecAivazis avatar Jun 12 '25 03:06 AlecAivazis

I'm going to close this since its gone a bit stale. let me know if you're still running into the issue and I'll gladly reopen it

AlecAivazis avatar Jun 24 '25 05:06 AlecAivazis

Hi, yes sorry, I'll update you when I tried your suggestion!

m1212e avatar Jun 24 '25 10:06 m1212e