NUXT_E1001

Composable called outside Nuxt context.

E1001

A composable that needs the Nuxt instance (useNuxtApp(), useRoute(), useFetch(), …) ran outside a plugin, Nuxt hook, route middleware, or Vue setup(). The most common trigger is calling it inside an async callback (setTimeout, .then(), after an await) where the context has been lost.

Resolution

Call the composable synchronously at the top of setup() / a plugin / middleware and reuse the captured result later. For server-side async work, wrap the call with nuxtApp.runWithContext().

Read more in Docs > Getting Started > Error Handling.
Was this helpful?