Solid
Solid
NNuxt
Created by Solid on 1/20/2025 in #❓・help
prevent useAsyncData from running in the browser
@kapa.ai Appending .server to the component prevents routing. The error is difficult to understand
Vite server hmr 5 files in 6.686ms

WARN [Vue Router warn]: uncaught error during route navigation:


ERROR [vite-node] [ERR_LOAD_URL] /components/auth/AuthProtectedpage.vue

at /components/auth/AuthProtectedpage.vue

[cause]: [vite-node] [ERR_LOAD_URL] /components/auth/AuthProtectedpage.vue

at /components/auth/AuthProtectedpage.vue


WARN [Vue Router warn]: uncaught error during route navigation:


ERROR [vite-node] [ERR_LOAD_URL] /components/auth/AuthProtectedpage.vue

at /components/auth/AuthProtectedpage.vue

[cause]: [vite-node] [ERR_LOAD_URL] /components/auth/AuthProtectedpage.vue

at /components/auth/AuthProtectedpage.vue


WARN [Vue Router warn]: No match found for location with path "/_nuxt/components/auth/AuthProtectedpage.vue?t=1737393555283"


WARN [Vue Router warn]: No match found for location with path "/_nuxt/components/auth/AuthProtectedpage.vue"
Vite server hmr 5 files in 6.686ms

WARN [Vue Router warn]: uncaught error during route navigation:


ERROR [vite-node] [ERR_LOAD_URL] /components/auth/AuthProtectedpage.vue

at /components/auth/AuthProtectedpage.vue

[cause]: [vite-node] [ERR_LOAD_URL] /components/auth/AuthProtectedpage.vue

at /components/auth/AuthProtectedpage.vue


WARN [Vue Router warn]: uncaught error during route navigation:


ERROR [vite-node] [ERR_LOAD_URL] /components/auth/AuthProtectedpage.vue

at /components/auth/AuthProtectedpage.vue

[cause]: [vite-node] [ERR_LOAD_URL] /components/auth/AuthProtectedpage.vue

at /components/auth/AuthProtectedpage.vue


WARN [Vue Router warn]: No match found for location with path "/_nuxt/components/auth/AuthProtectedpage.vue?t=1737393555283"


WARN [Vue Router warn]: No match found for location with path "/_nuxt/components/auth/AuthProtectedpage.vue"
19 replies
NNuxt
Created by Solid on 1/20/2025 in #❓・help
prevent useAsyncData from running in the browser
@kapa.ai setting lazy to true isn't an option. I am looking for ways to do server-side checks that should not run on the client. I prefer not to use plugins and also not middleware as I had the same issues with middleware. Is there no other option to ensure a page has a block of code that only executes on the server?
19 replies
NNuxt
Created by Solid on 1/20/2025 in #❓・help
prevent useAsyncData from running in the browser
@kapa.ai from what I understand from the documentation, the default value of the server option is what I would presume is 'true' seeing as there is only a case of 'client only fetching' where server is explicitly set to false. This default is as follows as according to the documentation "By default, data fetching composables will perform their asynchronous function on both client and server environments." setting it to true doesn't force it to only be executed on the server
19 replies