\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_",[2911,2912],{"name":2865,"color":2866},{"name":2868,"color":2869},15786,"[Nuxt 3] Nuxt instance unavailable in async actions during SSR","2023-01-19T18:20:59Z","https://github.com/nuxt/nuxt/issues/15786",0.60704595,{"description":2919,"labels":2920,"number":2923,"owner":2871,"repository":2871,"state":2872,"title":2924,"updated_at":2925,"url":2926,"score":2927},"### Environment\r\n\r\n------------------------------\r\n- Operating System: `Windows_NT`\r\n- Node Version: `v18.12.1`\r\n- Nuxt Version: `3.0.0`\r\n- Nitro Version: `1.0.0`\r\n- Package Manager: `npm@8.19.2`\r\n- Builder: `vite`\r\n- User Config: `runtimeConfig`, `modules`, `vite`, `imports`, `css`, `app`, `build`, `tailwindcss`\r\n- Runtime Modules: `@pinia/nuxt@0.4.6`, `@pinia-plugin-persistedstate/nuxt@1.0.0`, `@nuxtjs/tailwindcss@6.1.3`\r\n- Build Modules: `-`\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\nTop-level page:\r\n```const { data, error } = await useApi('url')```\r\n\r\nuseApi composable:\r\n\r\n```import type { NitroFetchRequest } from 'nitropack'\r\nimport type { KeyOfRes } from 'nuxt/dist/app/composables/asyncData'\r\nimport type { UseFetchOptions } from '#app'\r\n\r\nexport async function useApi\u003CT>(\r\n request: NitroFetchRequest,\r\n opts?:\r\n | UseFetchOptions\u003C\r\n T extends void ? unknown : T,\r\n (res: T extends void ? unknown : T) => T extends void ? unknown : T,\r\n KeyOfRes\u003C\r\n (res: T extends void ? unknown : T) => T extends void ? unknown : T\r\n >\r\n >\r\n | undefined,\r\n) {\r\n const config = useRuntimeConfig()\r\n\r\n const { body, ...rest } = opts || {}\r\n\r\n return await useFetch\u003CT>(request, {\r\n baseURL: config.public.BASE_URL,\r\n body: JSON.parse(JSON.stringify(body || null)),\r\n ...rest,\r\n })\r\n}\r\n```\r\n\r\n### Describe the bug\r\n\r\nThats bug only on 18 node+\r\nSOLVE: downgrade to 16 node\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n```shell\r\nError: nuxt instance unavailable\r\n at Module.useNuxtApp (C:/Users/sonic/Documents/GitHub/rubi-front-n3-1/node_modules/nuxt/dist/app/nuxt.mjs:165:13)\r\n at Module.useRequestEvent (C:/Users/sonic/Documents/GitHub/rubi-front-n3-1/node_modules/nuxt/dist/app/composables/ssr.mjs:14:58)\r\n at readRawCookies (C:/Users/sonic/Documents/GitHub/rubi-front-n3-1/node_modules/nuxt/dist/app/composables/cookie.mjs:46:62)\r\n at Module.useCookie (C:/Users/sonic/Documents/GitHub/rubi-front-n3-1/node_modules/nuxt/dist/app/composables/cookie.mjs:22:19)\r\n at Proxy.getToken (C:/Users/sonic/Documents/GitHub/rubi-front-n3-1/stores/auth.ts:25:44)\r\n at Proxy.\u003Canonymous> (file:///C:/Users/sonic/Documents/GitHub/rubi-front-n3-1/node_modules/pinia/dist/pinia.mjs:1365:30)\r\n at Object.onRequest (C:/Users/sonic/Documents/GitHub/rubi-front-n3-1/composables/useApi.ts:14:27)\r\n at $fetchRaw2 (file:///C:/Users/sonic/Documents/GitHub/rubi-front-n3-1/node_modules/ofetch/dist/shared/ofetch.5cb01515.mjs:122:29)\r\n at onError (file:///C:/Users/sonic/Documents/GitHub/rubi-front-n3-1/node_modules/ofetch/dist/shared/ofetch.5cb01515.mjs:102:16)\r\n at file:///C:/Users/sonic/Documents/GitHub/rubi-front-n3-1/node_modules/ofetch/dist/shared/ofetch.5cb01515.mjs:147:14,\r\n```\r\n",[2921,2922],{"name":2865,"color":2866},{"name":2868,"color":2869},12456,"useFetch not compatible with node 18+ (nuxt instance unavailable), has solve","2023-01-19T16:06:44Z","https://github.com/nuxt/nuxt/issues/12456",0.60838103,{"labels":2929,"number":2937,"owner":2871,"repository":2871,"state":2872,"title":2938,"updated_at":2939,"url":2940,"score":2941},[2930,2931,2934],{"name":2865,"color":2866},{"name":2932,"color":2933},"bug","d73a4a",{"name":2935,"color":2936},"🔨 p3-minor","FBCA04",13953,"`nuxt/app` imports are being externalised","2023-01-19T17:10:31Z","https://github.com/nuxt/nuxt/issues/13953",0.6101454,{"description":2943,"labels":2944,"number":2947,"owner":2871,"repository":2871,"state":2872,"title":2948,"updated_at":2949,"url":2950,"score":2951},"### Environment\n\nRootDir: /home/projects/github-pq8e17 15:59:18\r\nNuxt project info: 15:59:18\r\n\r\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v16.14.2`\r\n- Nuxt Version: `3.2.2`\r\n- Nitro Version: `2.2.2`\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------------------------------\n\n### Reproduction\n\n[Stackblitz Example](https://stackblitz.com/edit/github-pq8e17?file=app.vue)\r\n\r\n```\r\n\u003Ctemplate>\r\n \u003Cdiv>\r\n \u003Ch1>Test\u003C/h1>\r\n \u003C/div>\r\n\u003C/template>\r\n\u003Cscript setup lang=\"ts\">\r\nlet load = async (slug: string) => {\r\n const result1 = await useFetch('http://echo.jsontest.com/key/value/one/two', {\r\n key: 'one',\r\n });\r\n\r\n const result2 = await useFetch(\r\n 'http://echo.jsontest.com/key/value/three/four',\r\n { key: 'two' }\r\n );\r\n};\r\n\r\nawait load('example');\r\n\u003C/script>\r\n\r\n```\n\n### Describe the bug\n\nIn my app i need to first fetch a JSON which i then use to fetch a Second JSON. \r\nI want to wrap the code for loading into an extra function, to reuse them. \r\nThe first fetch in the example gets executed, but the second one throws the following error:\r\n```\r\n500\r\nnuxt instance unavailable\r\n\r\nat Module.useAsyncData (./node_modules/nuxt/dist/app/composables/asyncData.mjs:24:38)\r\nat Module.useFetch (./node_modules/nuxt/dist/app/composables/fetch.mjs:54:43)\r\nat load (./app.js:14:51)\r\nat async setup (./app.js:20:90)\r\n```\r\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2945,2946],{"name":2865,"color":2866},{"name":2868,"color":2869},19196,"nuxt instance unavailable","2023-02-21T15:43:48Z","https://github.com/nuxt/nuxt/issues/19196",0.61051714,{"description":2953,"labels":2954,"number":2959,"owner":2871,"repository":2871,"state":2872,"title":2960,"updated_at":2961,"url":2962,"score":2963},"Related https://github.com/nuxt/nuxt.js/issues/14068\r\n\r\n### Environment\r\n\r\n```\r\n- Operating System: `Linux`\r\n- Node Version: `v18.11.0`\r\n- Nuxt Version: `3.0.0-rc.11`\r\n- Nitro Version: `0.5.4`\r\n- Package Manager: `npm@8.19.2`\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/github-eusand\r\n\r\n### Describe the bug\r\n\r\nGreetings to the Nuxt development team and thank you so much for the great work. I'm trying to create a module that will communicate with our store's API. However, I ran into a problem that has been addressed here a few times. It is about using useAsyncData after await. This is because Nuxt prints the error \"nuxt instance unavailable\". I understand the reason why this is the case (series of https://www.vuemastery.com/blog/coding-better-composables-1-of-5). I can only use it in the setup part. However, I can't find a way in the Nuxt ecosystem to achieve currency retrieval (see stackblitz reproduction). If I just use $fetch, I lose the great functionality that useAsyncData offers. There is no way in composables or plugins to make two async requests in one method, which is often enough needed.\r\n\r\n### Additional context\r\n\r\nIs there a way to deal with this issue at the Nuxt level?\r\n\r\n### Logs\r\n\r\n```shell\r\n[nitro] [dev] [unhandledRejection] Error: nuxt instance unavailable\r\n at Module.useNuxtApp (/home/misaon/PhpstormProjects/nuxt-async/node_modules/nuxt/dist/app/nuxt.mjs:142:13)\r\n at Module.useAsyncData (/home/misaon/PhpstormProjects/nuxt-async/node_modules/nuxt/dist/app/composables/asyncData.mjs:26:38)\r\n at Object.get (/home/misaon/PhpstormProjects/nuxt-async/composables/useHttp.ts:16:34)\r\n at Object.getShopBaseCurrency (/home/misaon/PhpstormProjects/nuxt-async/composables/useShop.ts:9:17)\r\n at /home/misaon/PhpstormProjects/nuxt-async/plugins/bootstrap.ts:13:45\r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n```\r\n",[2955,2958],{"name":2956,"color":2957},"documentation","5319e7",{"name":2865,"color":2866},15194,"nuxt instance unavailable with useAsyncData - explained","2023-01-19T17:45:58Z","https://github.com/nuxt/nuxt/issues/15194",0.6226668,["Reactive",2965],{},["Set"],["ShallowReactive",2968],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f3UFTXdaXB0HDdXax6SPFZROBth-E1dDMQHAPxL_YAJQ":-1},"/nuxt/nuxt/14068"]