\n \u003CNuxtWelcome />\n \u003C/div>\n\u003C/template>\n\u003Cscript lang=\"ts\">\nconst store = useCounterStore()\n\u003C/script>\n\n```\nwith clean nuxt.config.ts\n```ts\n// https://nuxt.com/docs/api/configuration/nuxt-config\nexport default defineNuxtConfig({\n compatibilityDate: '2024-11-01',\n devtools: { enabled: true },\n modules: ['@pinia/nuxt']\n})\n```\n\n### Describe the bug\n\nAfter upgrading Nuxt to version 3.15.0 I cannot even start my app as I am getting `500\ninternal server error`. \nIn the console I am getting twice\n```zsh\n[nuxt] [request error] [unhandled] [500] [🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\nSee https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\nThis will fail in production.\n```\nI tried every new Nuxt version since, but with the same result. I tried to isolate the pinia module and created empty project from the starter template and the problem persists, so there is no module conflict.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\nERROR [nuxt] [request error] [unhandled] [500] [🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\nSee https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\n```",[2050,2051],{"name":1985,"color":1986},{"name":2052,"color":2053},"possible regression","B90A42",30751,"Pinia module causing [500] internal server error after upgrading to Nuxt version to 3.15.x","2025-02-03T10:44:22Z","https://github.com/nuxt/nuxt/issues/30751",0.66990006,{"description":2060,"labels":2061,"number":2064,"owner":1991,"repository":1991,"state":1992,"title":2065,"updated_at":2066,"url":2067,"score":2068},"### Environment\r\n\r\n \"dependencies\": {\r\n \"@pinia/nuxt\": \"^0.5.1\",\r\n \"axios\": \"^1.6.8\",\r\n \"lodash\": \"^4.17.21\",\r\n \"nuxt\": \"^3.11.1\",\r\n \"nuxt-lodash\": \"^2.5.3\",\r\n \"pinia\": \"^2.1.7\",\r\n \"vue\": \"^3.4.21\",\r\n \"vue-router\": \"^4.3.0\"\r\n }\r\n\r\nexport default defineNuxtConfig({\r\n devtools: { enabled: true },\r\n \r\n modules: [\r\n \r\n '@pinia/nuxt'\r\n ],\r\n\r\n pinia: {\r\n autoImports: ['defineStore', 'acceptHMRUpdate', 'storeToRefs', 'mapStores', 'getActivePinia','usePinia'],\r\n // storesDirs: ['./stores/**'],\r\n },\r\n})\r\n\r\nPinia auto imports invalid\r\n\r\n### Reproduction\r\n\r\nhttps://github.com/gllinzbk1/nuxt3.111.git\r\n\r\n### Describe the bug\r\n\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_No response_",[2062,2063],{"name":2001,"color":2002},{"name":1985,"color":1986},26456," 3.11.1 Pinia not working","2024-03-25T07:44:43Z","https://github.com/nuxt/nuxt/issues/26456",0.67069167,{"labels":2070,"number":2076,"owner":1991,"repository":1991,"state":1992,"title":2077,"updated_at":2078,"url":2079,"score":2080},[2071,2072,2075],{"name":2001,"color":2002},{"name":2073,"color":2074},"vite","3574D1",{"name":2018,"color":2019},14368,"Pinia not working - No active Pinia","2023-01-19T17:35:05Z","https://github.com/nuxt/nuxt/issues/14368",0.671573,{"description":2082,"labels":2083,"number":2085,"owner":1991,"repository":1991,"state":1992,"title":2086,"updated_at":2087,"url":2088,"score":2089},"### Environment\n\n------------------------------\n- Operating System: Linux\n- Node Version: v20.9.0\n- Nuxt Version: 3.15.0\n- CLI Version: 3.17.2\n- Nitro Version: 2.10.4\n- Package Manager: yarn@1.22.19\n- Builder: -\n- User Config: default\n- Runtime Modules: @pinia/nuxt@0.9.0\n- Build Modules: -\n------------------------------\n\n\n### Reproduction\n\nhttps://codesandbox.io/p/devbox/compassionate-black-jrfrgr?file=%2Fpages%2Findex.vue%3A5%2C12&workspaceId=ws_C8YsBz2W6pCYjgPZ5hNEpq\n\n### Describe the bug\n\nhaving a key with same name as a variable that uses a store breaks nuxt and pinia integration somehow.\ncheck `index.vue` page to see the reproduction\n\n### Additional context\n\nIt was super hard to track this down, but I hope this minimal reproduction can prove that this is a bug.\n\n### Logs\n\n```shell-script\n ERROR [nuxt] [request error] [unhandled] [500] [🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\nSee https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\nThis will fail in production.\n```",[2084],{"name":1985,"color":1986},30430,"Having a variable with same name as key in definePageMeta breaks pinia integration","2025-01-02T11:30:26Z","https://github.com/nuxt/nuxt/issues/30430",0.6750176,{"description":2091,"labels":2092,"number":2095,"owner":1991,"repository":1991,"state":1992,"title":2096,"updated_at":2097,"url":2098,"score":2099},"### Environment\n\n- Operating System: Linux\r\n- Node Version: v16.20.0\r\n- Nuxt Version: 3.7.2\r\n- CLI Version: 3.8.3\r\n- Nitro Version: 2.6.3\r\n- Package Manager: npm@9.4.2\r\n- Builder: -\r\n- User Config: modules, nitro, runtimeConfig\r\n- Runtime Modules: @pinia/nuxt@0.4.11\r\n- Build Modules: \n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-bwuqrs\n\n### Describe the bug\n\nIn my personal project, I have to do two requests on the server side. For this, I was using useAsyncData, making one request, and after it, doing another with the data of the previous request. \r\n\r\nit worked normally when I was using direct axios service. However, when I created a plugin for $api and injected it in the nuxt context, the second request started to throw an error: **A composable that requires access to the Nuxt instance was called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function**.\r\n\r\nI do these requests inside pinia store, calling useNuxtApp().$api inside of the store, for each request.\r\n\r\nExample of **useAsyncData**:\r\n```\r\nawait useAsyncData('initStore', async () => {\r\n if (process.server) {\r\n const settingsStore = useSettingsStore();\r\n // Change condition to works\r\n if (true) {\r\n await settingsStore.get();\r\n await settingsStore.get();\r\n } else {\r\n console.log('No error');\r\n await Promise.allSettled([settingsStore.get(), settingsStore.get()]);\r\n }\r\n }\r\n});\r\n```\r\n\r\n**Pinia store:** \r\n```\r\nexport const useSettingsStore = defineStore('settingsStore', {\r\n state: () => ({}),\r\n actions: {\r\n async get() {\r\n try {\r\n const { $api } = useNuxtApp();\r\n console.log('$api passed');\r\n } catch (err) { \r\n console.log('error inside catch', err);\r\n } \r\n },\r\n },\r\n});\r\n```\r\n\r\nDo I have to instantiate useNuxtApp inside useAsyncData and pass it to actions inside pinia? Why the second request is throwing this error? Is there a solution for that?\r\n\r\nPs.: If I do both requests at the same time, It works normally, the nuxt context inside pinia works.\r\n\r\n\r\n\r\n\r\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\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`.\n```\n",[2093,2094],{"name":2001,"color":2002},{"name":1985,"color":1986},23192,"Call useNuxtApp two times in pinia store inside useAsyncData - Nuxt context instance error","2023-09-13T22:49:03Z","https://github.com/nuxt/nuxt/issues/23192",0.6757911,["Reactive",2101],{},["Set"],["ShallowReactive",2104],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"Qfb7LuTx4Gr2wfc3U0hkwieG_j_HCD25w57dzxnyIQ8":-1},"/nuxt/nuxt/31416"]