\r\n\u003C/template>\r\n```\r\n\r\nPage template:\r\n```\r\n\u003Ctemplate>\r\n \u003CNuxtLayout name=\"client\">\r\n Template:\r\n \u003C/NuxtLayout>\r\n\u003C/template>\r\n```\r\n",[2919,2922],{"name":2920,"color":2921},"3.x","29bc7f",{"name":2923,"color":2924},"pending triage","E99695",22379,"closed","Using createError with useAsyncData renders the error beneath the rest of the content","2023-07-28T18:16:08Z","https://github.com/nuxt/nuxt/issues/22379",0.6414708,{"labels":2932,"number":2937,"owner":2910,"repository":2910,"state":2926,"title":2938,"updated_at":2939,"url":2940,"score":2941},[2933,2934],{"name":2920,"color":2921},{"name":2935,"color":2936},"bug","d73a4a",12080,"useAsyncData error on dev, but ok in production","2023-01-19T15:55:10Z","https://github.com/nuxt/nuxt/issues/12080",0.65140796,{"description":2943,"labels":2944,"number":2949,"owner":2910,"repository":2910,"state":2926,"title":2950,"updated_at":2951,"url":2952,"score":2953},"### Environment\n\n- Operating System: Windows_NT\r\n- Node Version: v18.20.3\r\n- Nuxt Version: 3.13.0\r\n- CLI Version: 3.13.1\r\n- Nitro Version: 2.9.7\r\n- Package Manager: pnpm@9.4.0\r\n- Builder: -\r\n- User Config: compatibilityDate, devtools, modules, eslint, pwa, csurf, vite, build, app, vueuse, devServer, hooks, pinia, css\r\n- Runtime Modules: @unocss/nuxt@0.62.3, @nuxtjs/device@3.2.2, @nuxt/eslint@0.5.5, @pinia/nuxt@0.5.4, @pinia-plugin-persistedstate/nuxt@1.2.1, @vueuse/nuxt@11.0.3, @vite-pwa/nu\r\nxt@0.10.3, nuxt-csurf@1.6.2, nuxt-authorization@0.0.4, nuxt-icon@0.6.10, nuxtjs-naive-ui@1.0.2\r\n- Build Modules: -\r\n\n\n### Reproduction\n\n无\n\n### Describe the bug\n\n我使用useAsyncData在服务端获取数据,且引入了 'nuxt-csurf'。\r\n如果我使用$fetch,就会触发403错误,\r\n如果我使用$csrfFetch,就返回错误,空数据,无法解析。\r\n-------------------------------------------------------------------------\r\nI use 'useAsyncData' to retrieve data on the server and introduce 'nuxt csurf'.\r\nIf I use $fetch, it will trigger a 403 error,\r\nIf I use $csrfFetch, it returns an error, empty data, and cannot be parsed.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2945,2946],{"name":2923,"color":2924},{"name":2947,"color":2948},"needs reproduction","FBCA04",29007,"useAsyncData use $csrfFetch ","2024-09-16T02:05:00Z","https://github.com/nuxt/nuxt/issues/29007",0.66602594,{"description":2955,"labels":2956,"number":2959,"owner":2910,"repository":2910,"state":2926,"title":2960,"updated_at":2961,"url":2962,"score":2963},"### Environment\n\n- Operating System: `Linux`\r\n- Node Version: `v16.16.0`\r\n- Nuxt Version: `3.0.0`\r\n- Nitro Version: `1.0.0`\r\n- Package Manager: `yarn@1.22.18`\r\n- Builder: `vite`\r\n- User Config: `modules`, `strapi`\r\n- Runtime Modules: `@nuxtjs/strapi@1.6.3`\r\n- Build Modules: `-`\n\n### Reproduction\n\nHere is a link to a [stack blitz repo](https://stackblitz.com/edit/nuxt-starter-jgaxk1?file=app.vue) to help reproduce. \n\n### Describe the bug\n\nHello, I can't seem to wrap my head around what this issue might me. For context, I'm using the Strapi Module to pull data from my Strapi CMS and display it in my next application. There seems to be a problem only when i use both the Strapi module and the the Nuxt pages feature. When I pull data from Strapi with the Nuxt module in my `app.vue` it displays as expected. When start to use Nuxt pages and my components, everything seems to stop working and get the error that says \"500 nuxt instance unavailable\".\r\n\r\nWasn't really sure where to add the issue but i don't think it comes from the Nuxt module, everything seems to be working well. I wonder if I missed something in my implementation of Nuxt pages or is there something specific I need to do? Otherwise, the stack trace is shown below and hopefully that's enough context for someone to help out. \n\n### Additional context\n\nif you change `pages` to `somepages` to deactivate the pages feature and reload the application, you will see the CMS data on displayed on your page (coming from `app.vue`) but once you change the name back to pages you get the same error :/\n\n### Logs\n\n```shell\nNuxt 3.0.0 with Nitro 1.0.0 03:13:42\r\n 03:13:43\r\n > Local: http://localhost:3000/\r\n > Network: http://172.25.251.116:3000/\r\n\r\nℹ Vite client warmed up in 3231ms 03:13:47\r\n✔ Nitro built in 1277 ms nitro 03:13:48\r\n[Vue Router warn]: uncaught error during route navigation: 03:13:52\r\nError: nuxt instance unavailable 03:13:52\r\n at Module.useNuxtApp (/home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/nuxt/dist/app/nuxt.mjs:165:13)\r\n at Module.useStrapiClient (/home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/@nuxtjs/strapi/dist/runtime/composables/useStrapiClient.mjs:27:38)\r\n at Module.useStrapiGraphQL (/home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/@nuxtjs/strapi/dist/runtime/composables/useStrapiGraphQL.mjs:8:40)\r\n at /home/malgamves/code/strapi-dynamic-zones-company-site/client/pages/index.vue:11:39\r\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\r\n at async ViteNodeRunner.directRequest (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/vite-node/dist/client.mjs:270:5)\r\n at async ViteNodeRunner.cachedRequest (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/vite-node/dist/client.mjs:146:12)\r\n at async request (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/vite-node/dist/client.mjs:169:16)\r\n at async /home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/nuxt/dist/pages/runtime/router.mjs:75:94\r\n at async Object.callAsync (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/unctx/dist/index.mjs:53:16)\r\n[Vue Router warn]: uncaught error during route navigation: 03:13:52\r\nError: nuxt instance unavailable 03:13:52\r\n at Module.useNuxtApp (/home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/nuxt/dist/app/nuxt.mjs:165:13)\r\n at Module.useStrapiClient (/home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/@nuxtjs/strapi/dist/runtime/composables/useStrapiClient.mjs:27:38)\r\n at Module.useStrapiGraphQL (/home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/@nuxtjs/strapi/dist/runtime/composables/useStrapiGraphQL.mjs:8:40)\r\n at /home/malgamves/code/strapi-dynamic-zones-company-site/client/pages/index.vue:11:39\r\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\r\n at async ViteNodeRunner.directRequest (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/vite-node/dist/client.mjs:270:5)\r\n at async ViteNodeRunner.cachedRequest (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/vite-node/dist/client.mjs:146:12)\r\n at async request (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/vite-node/dist/client.mjs:169:16)\r\n at async /home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/nuxt/dist/pages/runtime/router.mjs:75:94\r\n at async Object.callAsync (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/unctx/dist/index.mjs:53:16)\r\n[Vue Router warn]: uncaught error during route navigation: 03:13:52\r\nError: nuxt instance unavailable 03:13:52\r\n at Module.useNuxtApp (/home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/nuxt/dist/app/nuxt.mjs:165:13)\r\n at Module.useStrapiClient (/home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/@nuxtjs/strapi/dist/runtime/composables/useStrapiClient.mjs:27:38)\r\n at Module.useStrapiGraphQL (/home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/@nuxtjs/strapi/dist/runtime/composables/useStrapiGraphQL.mjs:8:40)\r\n at /home/malgamves/code/strapi-dynamic-zones-company-site/client/pages/index.vue:11:39\r\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\r\n at async ViteNodeRunner.directRequest (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/vite-node/dist/client.mjs:270:5)\r\n at async ViteNodeRunner.cachedRequest (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/vite-node/dist/client.mjs:146:12)\r\n at async request (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/vite-node/dist/client.mjs:169:16)\r\n at async /home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/nuxt/dist/pages/runtime/router.mjs:75:94\r\n at async Object.callAsync (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/unctx/dist/index.mjs:53:16)\r\n[Vue Router warn]: uncaught error during route navigation: 03:13:52\r\nError: nuxt instance unavailable 03:13:52\r\n at Module.useNuxtApp (/home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/nuxt/dist/app/nuxt.mjs:165:13)\r\n at Module.useStrapiClient (/home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/@nuxtjs/strapi/dist/runtime/composables/useStrapiClient.mjs:27:38)\r\n at Module.useStrapiGraphQL (/home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/@nuxtjs/strapi/dist/runtime/composables/useStrapiGraphQL.mjs:8:40)\r\n at /home/malgamves/code/strapi-dynamic-zones-company-site/client/pages/index.vue:11:39\r\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\r\n at async ViteNodeRunner.directRequest (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/vite-node/dist/client.mjs:270:5)\r\n at async ViteNodeRunner.cachedRequest (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/vite-node/dist/client.mjs:146:12)\r\n at async request (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/vite-node/dist/client.mjs:169:16)\r\n at async /home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/nuxt/dist/pages/runtime/router.mjs:75:94\r\n at async Object.callAsync (file:///home/malgamves/code/strapi-dynamic-zones-company-site/client/node_modules/unctx/dist/index.mjs:53:16)\n```\n",[2957,2958],{"name":2920,"color":2921},{"name":2923,"color":2924},15755,"[bug] 500 nuxt instance unavailable | whenever I use nuxt pages and the Strapi module","2023-01-19T18:20:44Z","https://github.com/nuxt/nuxt/issues/15755",0.6684935,{"description":2965,"labels":2966,"number":2968,"owner":2910,"repository":2910,"state":2926,"title":2969,"updated_at":2970,"url":2971,"score":2972},"### Environment\n\n```\n- Operating System: Darwin\n- Node Version: v21.6.2\n- Nuxt Version: 3.13.0\n- CLI Version: 3.13.0\n- Nitro Version: 2.9.7\n- Package Manager: npm@10.8.3\n- Builder: -\n- User Config: devtools, experimental, runtimeConfig, routeRules, app, css, plugins, modules, proxy, googleFonts, primevue, tailwindcss, compatibilityDate, vite\n- Runtime Modules: nuxt-proxy-request@1.10.0\n- Build Modules: -\n```\n\n### Reproduction\n\nI get error\n\n```\n ERROR Failed to parse URL from /api/search?order=price_asc&categories=8\n\n at node:internal/deps/undici/undici:12443:11\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async $fetchRaw2 (node_modules/ofetch/dist/shared/ofetch.37386b05.mjs:222:26)\n at async $fetch2 (node_modules/ofetch/dist/shared/ofetch.37386b05.mjs:268:15)\n\n\n ERROR Failed to parse URL from /api/search?order=price_asc&categories=8\n\n at node:internal/deps/undici/undici:12443:11\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async $fetchRaw2 (node_modules/ofetch/dist/shared/ofetch.37386b05.mjs:222:26)\n at async $fetch2 (node_modules/ofetch/dist/shared/ofetch.37386b05.mjs:268:15)\n\n```\n\nfetch plugin\n\n```\nimport { ofetch, type FetchContext } from \"ofetch\";\nimport { defineNuxtPlugin } from \"#app\";\n\nexport default defineNuxtPlugin(() => {\n const headers = useRequestHeaders([\"cookie\"]);\n globalThis.$fetch = ofetch.create({\n headers,\n credentials: \"include\",\n retry: 0,\n onRequestError({ error }) {\n console.error(error);\n },\n });\n});\n```\n\n\n```\nconst { products, totalPages, fetchFilteredProducts } = useProducts();\n\nconst { refresh, error } = await useAsyncData(\n \"products\",\n () => fetchFilteredProducts(queryParams.value),\n {\n server: true,\n lazy: true,\n watch: [queryParams.value],\n }\n);\n\n```\ncomposable\n\n```\nexport const useProducts = () => {\n const $projectServices = useProjectService();\n\n const state = reactive({\n products: [],\n totalPages: 0,\n });\n\nconst fetchFilteredProducts = async (queryParams: any) => {\n try {\n const response = await globalThis.$fetch(\"/api/search\", {\n method: \"GET\",\n params: queryParams,\n });\n\n state.products = response.products;\n state.totalPages = response.count;\n return response;\n } catch (err) {\n throw err;\n }\n };\n\n return {\n ...toRefs(state),\n fetchFilteredProducts,\n };\n};\n```\n\n\n### Describe the bug\n\nI get an error when I reload the page using f5.\n\nVia useFetch\n\n```\nconst {\n data: initialProductsData,\n refresh,\n error,\n} = await useFetch(urlGenerator.searchProductsUrl(), {\n lazy: true,\n watch: false,\n params: queryParams.value,\n});\n\n\n```\n\neverything works fine, but I need asyncData to reuse composable \n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2967],{"name":2923,"color":2924},29626,"useAsyncData - ERROR Failed to parse URL","2024-10-21T14:51:48Z","https://github.com/nuxt/nuxt/issues/29626",0.6686296,{"description":2901,"labels":2974,"number":2975,"owner":2910,"repository":2910,"state":2926,"title":2912,"updated_at":2976,"url":2977,"score":2978},[],15829,"2023-01-20T14:16:03Z","https://github.com/nuxt/nuxt/issues/15829",0.66928434,{"description":2980,"labels":2981,"number":2984,"owner":2910,"repository":2910,"state":2926,"title":2985,"updated_at":2986,"url":2987,"score":2988},"### Environment\r\n\r\nReproduction environment is:\r\n\r\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v16.14.2\r\n- Nuxt Version: 3.5.2\r\n- Nitro Version: 2.4.1\r\n- Package Manager: npm@7.17.0\r\n- Builder: vite\r\n- User Config: -\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/nuxt-starter-rklf6m?file=app.vue\r\n\r\n### Describe the bug\r\n\r\nWhen we asynchronously use `useRuntimeConfig()` within `useAsyncData()`, it causes an error, but there is no error when it is used synchronously.\r\n\r\nHere is a successful example:\r\n\r\n```ts\r\nconst { data, error } = await useAsyncData('TEST', () => {\r\n useRuntimeConfig();\r\n useRuntimeConfig();\r\n\r\n return 'success';\r\n});\r\n```\r\n\r\nAnd here is an example where an error occurs:\r\n\r\n```ts\r\nfunction sleep(ms: number) {\r\n return new Promise((resolve) => setTimeout(resolve, ms));\r\n}\r\n\r\nconst { data, error } = await useAsyncData('TEST', async () => {\r\n useRuntimeConfig();\r\n await sleep(100);\r\n useRuntimeConfig();\r\n\r\n return 'success';\r\n});\r\n```\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n```shell-script\r\nError: [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#using-vue-and-nuxt-composables`.\r\n```\r\n",[2982,2983],{"name":2920,"color":2921},{"name":2923,"color":2924},21270,"An error occurs when while asynchronously using `useRuntimeConfig()` within `useAsyncData()`","2023-05-31T08:46:35Z","https://github.com/nuxt/nuxt/issues/21270",0.6698672,{"description":2990,"labels":2991,"number":2994,"owner":2910,"repository":2910,"state":2926,"title":2995,"updated_at":2996,"url":2997,"score":2998},"### Environment\n\n- Node Version: `v19.6.0`\r\n- Nuxt Version: `3.2.3`\r\n- Nitro Version: `2.2.3`\r\n- Package Manager: `yarn@1.22.19`\r\n- Builder: `vite`\r\n- User Config: `typescript`, `plugins`, `modules`\r\n- Runtime Modules: `~/modules/dynamic-config.ts`, `@nuxt-alt/auth@2.3.3`, `@pinia/nuxt@0.4.7`, `@nuxtjs/color-mode@3.2.0`, `@nuxtjs/robots@3.0.0`\r\n- Build Modules: `-`\n\n### Reproduction\n\nBroken in Nuxt version: 3.2.3\r\nhttps://stackblitz.com/edit/nuxt-starter-d5ilwd\r\n\r\n\r\nWorks in Nuxt version: 3.0.0-rc.8\r\nhttps://stackblitz.com/edit/github-cmeky2-bstllm\r\n\r\n\n\n### Describe the bug\n\nCalling useAsyncData and waiting for the error, I try to call \"setResponseStatus\" but it throws an exception:\r\n\r\n`[nuxt] error caught during app initialization H3Error: nuxt instance unavailable 15:24:39\r\n at Module.useNuxtApp (file:///home/projects/nuxt-starter-d5ilwd/node_modules/nuxt/dist/app/nuxt.mjs:173:13)\r\n at useRequestEvent (file:///home/projects/nuxt-starter-d5ilwd/node_modules/nuxt/dist/app/composables/ssr.mjs:14:58)\r\n at Module.setResponseStatus (file:///home/projects/nuxt-starter-d5ilwd/node_modules/nuxt/dist/app/composables/ssr.mjs:27:25)\r\n at setup (file:///home/projects/nuxt-starter-d5ilwd/pages/movie/[id].vue:20:29) {\r\n statusCode: 500,\r\n fatal: false,\r\n unhandled: false,\r\n statusMessage: undefined,\r\n __nuxt_error: true\r\n}\r\n`\r\n\r\nThis seems to happen using the latest version of Nuxt (3.2.3) however seems to work fine in RC8 - no exception is thrown and the status is applied to the response.\r\n\r\nI included examples of both via stackblitz.\r\n\r\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2992,2993],{"name":2920,"color":2921},{"name":2923,"color":2924},19349,"setResponseStatus causes exception in page setup.","2023-03-01T14:50:35Z","https://github.com/nuxt/nuxt/issues/19349",0.6700836,{"description":3000,"labels":3001,"number":3004,"owner":2910,"repository":2910,"state":2926,"title":3005,"updated_at":3006,"url":3007,"score":3008},"### Environment\n\n```\r\n------------------------------\r\n- Operating System: `Darwin`\r\n- Node Version: `v14.21.1`\r\n- Nuxt Version: `3.0.0`\r\n- Nitro Version: `1.0.0`\r\n- Package Manager: `npm@6.14.17`\r\n- Builder: `vite`\r\n- User Config: `modules`, `apollo`, `app`, `css`\r\n- Runtime Modules: `@nuxtjs/apollo@5.0.0-alpha.4`\r\n- Build Modules: `-`\r\n------------------------------\r\n```\n\n### Reproduction\n\n`/pages/test.vue`\r\n```vue\r\n\u003Ctemplate>\r\n \u003CNuxtLink to=\"/testAsync\">GO\u003C/NuxtLink>\r\n\u003C/template>\r\n```\r\n\r\n`/pages/testAsync.vue`\r\n```vue\r\n\u003Cscript setup lang=\"ts\">\r\n import useTestAsync from '~~/composables/testAsync';\r\n const {data, error} = await useTestAsync();\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003Cdiv>DATA: \"{{ data }}\"\u003C/div>\r\n \u003Cdiv>ERR: \"{{ error }}\"\u003C/div>\r\n\u003C/template>\r\n```\r\n\r\n`/composables/testAsync.ts`\r\n```ts\r\nexport default async function useTestAsync() {\r\n return useAsyncData(async () => {\r\n const {data: a} = await useAsyncData\u003Cnumber>('k1', async () => Math.random());\r\n const {data: b} = await useAsyncData\u003Cnumber>('k2', async () => Math.random());\r\n\r\n return ((a.value || -1) + (b.value || -1));\r\n });\r\n}\r\n```\r\n\r\n1. Go to `/test`\r\n2. Click on the \"GO\" link\r\n3. Notice that the \"DATA: \u003Crandom>\" is filled with a random num\r\n4. Refresh the page (to render this page on the server)\r\n5. Notice that the \"DATA\" is empty and the \"ERROR\" says, `\"ERR: \"Error: nuxt instance unavailable\"`\n\n### Describe the bug\n\nThe code above returns an error `Error: nuxt instance unavailable` on the server but works as expected on dynamic navigation to this page on the client.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3002,3003],{"name":2920,"color":2921},{"name":2923,"color":2924},15596,"Nested \"useAsyncData\" fails on SSR and works on the client","2023-04-17T08:39:04Z","https://github.com/nuxt/nuxt/issues/15596",0.6726636,["Reactive",3010],{},["Set"],["ShallowReactive",3013],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fNTnIkiv2HA3D4nEYTvWMD7iJ54QgM40DmKPjN9g6ESg":-1},"/nuxt/nuxt/22249"]