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
When i trying to handling error, on ssr default useFetch callback is not available to using nuxt actions like navigateTo or any composables, i cant call any methods. Then how i can handling errors, and why u added error handling, if i cant using any nuxt actions in them?
Error: [nuxt] A composable that requires access to the Nuxt instance was called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function. This is probably not a Nuxt bug. Find out more at https://nuxt.com/docs/guide/concepts/auto-imports#vue-and-nuxt-composables.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
Operating System: Darwin
Node Version: v18.16.0
Nuxt Version: 3.10.3
CLI Version: 3.10.1
Nitro Version: 2.9.1
Package Manager: yarn@1.22.19
Builder: -
User Config: alias, runtimeConfig, modules, i18n, app, css, vite
Runtime Modules: @nuxtjs/i18n@8.1.1
Build Modules: -
Reproduction
<script setup> const { data, pending, error, execute } = useLazyFetch('/api/test', { onResponseError: () => navigateTo("/") }) </script>Describe the bug
When i trying to handling error, on ssr default useFetch callback is not available to using nuxt actions like navigateTo or any composables, i cant call any methods. Then how i can handling errors, and why u added error handling, if i cant using any nuxt actions in them?
Error: [nuxt] A composable that requires access to the Nuxt instance was called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function. This is probably not a Nuxt bug. Find out more at
https://nuxt.com/docs/guide/concepts/auto-imports#vue-and-nuxt-composables
.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: