Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sveltekit warning (or error) message #15

Closed
demetrius-mp opened this issue Mar 8, 2023 · 2 comments
Closed

sveltekit warning (or error) message #15

demetrius-mp opened this issue Mar 8, 2023 · 2 comments

Comments

@demetrius-mp
Copy link

not sure how to reproduce it, but i got the following warning:

Error: Cannot subscribe to 'page' store on the server outside of a Svelte component, as it is bound to the current request via component context. This prevents state from leaking between users.For more information, see https://kit.svelte.dev/docs/state-management#avoid-shared-state-on-the-server

this is the trace: (highlighted the line where superforms appear)
at get_store (/node_modules/@sveltejs/kit/src/runtime/app/stores.js:68:9)
at Object.subscribe (/node_modules/@sveltejs/kit/src/runtime/app/stores.js:26:24)
at subscribe (/node_modules/svelte/internal/index.mjs:57:25)
at Module.get_store_value (/node_modules/svelte/internal/index.mjs:62:5)
at Module.superForm (/node_modules/sveltekit-superforms/dist/client/index.js:59:23)
at +page.svelte:13:60
at Object.$$render (/node_modules/svelte/internal/index.mjs:1892:22)
at Object.default (root.svelte:48:44)
at eval (/node_modules/@sveltejs/kit/src/runtime/components/layout.svelte:8:41)
at Object.$$render (/node_modules/svelte/internal/index.mjs:1892:22)

@ciscoheat
Copy link
Owner

That's strange, the only subscription to page is done within an if(browser) check. Does it appear in the latest version as well? (0.5.20)

If it does, can you look in the browser debugger for the line where it happens in the superforms file, and paste it here?

@demetrius-mp
Copy link
Author

never happened again, guess it was some startup error on svelte kit, im going to close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants