\r\n \u003C/div>\r\n\u003C/template>\r\n```\r\n\r\nutils/test.js :\r\n```\r\nexport const test = async () => {\r\n let promise = new Promise((resolve, reject) => {\r\n setTimeout(() => resolve(\"done!\"), 1000)\r\n });\r\n const nuxtApp1 = useNuxtApp();\r\n await promise;\r\n const nuxtApp2 = useNuxtApp();\r\n return Promise.resolve();\r\n}\r\n``` \r\n\n\n### Logs\n\n_No response_",[2040,2041],{"name":1998,"color":1999},{"name":2001,"color":2002},15786,"[Nuxt 3] Nuxt instance unavailable in async actions during SSR","2023-01-19T18:20:59Z","https://github.com/nuxt/nuxt/issues/15786",0.6035112,{"description":2048,"labels":2049,"number":2052,"owner":1984,"repository":1984,"state":1985,"title":2053,"updated_at":2054,"url":2055,"score":2056},"### Environment\n\n- Operating System: `Darwin`\r\n- Node Version: `v18.1.0`\r\n- Nuxt Version: `3.3.1`\r\n- Nitro Version: `2.3.1`\r\n- Package Manager: `pnpm@7.25.0`\r\n- Builder: `vite`\r\n- User Config: `-`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n\n\n### Reproduction\n\nhttps://github.com/Jamiewarb/nuxt-useasync-repro\r\n\r\n- Clone repo\r\n- `pnpm install && pnpm dev`\r\n- Open localhost:3000\r\n- Observe error\r\n\r\n`'~/composables/useTest'` contains two functions, the difference being the lines swapped around. One works, and one doesn't, so you can see both.\r\n\r\nCopying the non-working function directly into the \u003Cscript> tag of `app.vue` means it starts working again.\n\n### Describe the bug\n\nWithin a component, when calling a function that uses `await`, there is a bug that appears depending on the order of the await's. I assume this is to do with the compiler and Nuxt's composables, but I'm not sure how to describe it.\r\n\r\nThe below doesn't work, and throws a `nuxt instance unavailable`:\r\n\r\n```\r\nexport async function useTestDoesntWork() {\r\n await fn();\r\n await useAsyncData(async () => {});\r\n}\r\n```\r\n\r\nBut swapping the order is fine:\r\n\r\n```\r\nexport async function useTestWorks() {\r\n await useAsyncData(async () => {});\r\n await fn();\r\n}\r\n```\r\n\r\nFurthermore, taking the non-working code and putting it directly into a component `\u003Cscript setup>` means it works again:\r\n\r\n```\r\n\u003Cscript setup>\r\nawait fn();\r\nawait useAsyncData(async () => {});\r\n\u003C/script>\r\n```\r\n\r\n\r\n\u003Cimg width=\"1400\" alt=\"image\" src=\"https://user-images.githubusercontent.com/2754728/225452101-ceaafbeb-c2be-499b-8ac0-91550d535252.png\">\r\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\nnuxt instance unavailable\r\n\r\nat Module.useAsyncData (./node_modules/.pnpm/nuxt@3.3.1/node_modules/nuxt/dist/app/composables/asyncData.js:24:38)\r\nat Module.useTestDoesntWork (./composables/useTest.ts:5:31)\r\nat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\nat async setup (./app.js:10:116)\r\n\r\n```\n```\n",[2050,2051],{"name":1998,"color":1999},{"name":2001,"color":2002},19724,"Awaiting a function then awaiting `useAsyncData` throws \"nuxt instance unavailable\" error - but only in a composable","2023-03-16T22:07:08Z","https://github.com/nuxt/nuxt/issues/19724",0.6143126,{"labels":2058,"number":2066,"owner":1984,"repository":1984,"state":1985,"title":2067,"updated_at":2068,"url":2069,"score":2070},[2059,2060,2063],{"name":1998,"color":1999},{"name":2061,"color":2062},"bug","d73a4a",{"name":2064,"color":2065},"🔨 p3-minor","FBCA04",13953,"`nuxt/app` imports are being externalised","2023-01-19T17:10:31Z","https://github.com/nuxt/nuxt/issues/13953",0.6151294,{"description":2072,"labels":2073,"number":2077,"owner":1984,"repository":1984,"state":1985,"title":2078,"updated_at":2079,"url":2080,"score":2081},"### Environment\n\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v20.15.1\r\n- Nuxt Version: 3.13.1\r\n- CLI Version: 3.13.1\r\n- Nitro Version: 2.9.7\r\n- Package Manager: bun@1.1.28\r\n- Builder: -\r\n- User Config: compatibilityDate\r\nui, tailwindcss, css, vite, nitro, typescript\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n------------------------------\r\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-jdafkm?file=app.tsx\n\n### Describe the bug\n\nCalling `useFetch` / `useLazyFetch` with await returns:\r\n`[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`.`\r\n\r\nWhen I remove the `await` the page loads but I'm not sure is the correct way of using `useFetch`.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2074],{"name":2075,"color":2076},"documentation","5319e7",29003,"`useFetch` twice \"A composable that requires access to the Nuxt instance was called outside of a plugin...\"","2024-09-16T12:48:46Z","https://github.com/nuxt/nuxt/issues/29003",0.6160332,["Reactive",2083],{},["Set"],["ShallowReactive",2086],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"3UFTXdaXB0HDdXax6SPFZROBth-E1dDMQHAPxL_YAJQ":-1},"/nuxt/nuxt/14068"]