\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```",[2015,2016],{"name":1985,"color":1986},{"name":2017,"color":2018},"possible regression","B90A42",30751,"closed","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.68947965,{"labels":2026,"number":2031,"owner":1988,"repository":1988,"state":2020,"title":2032,"updated_at":2033,"url":2034,"score":2035},[2027,2030],{"name":2028,"color":2029},"3.x","29bc7f",{"name":1985,"color":1986},14448,"Pinia Error: __vite_ssr_import_1__.useStore is not a function","2023-01-19T17:35:26Z","https://github.com/nuxt/nuxt/issues/14448",0.69280946,{"description":2037,"labels":2038,"number":2041,"owner":1988,"repository":1988,"state":2020,"title":2042,"updated_at":2043,"url":2044,"score":2045},"### Environment\n\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v18.16.1\r\n- Nuxt Version: 3.6.5\r\n- Nitro Version: 2.5.2\r\n- Package Manager: pnpm@8.6.11\r\n- Builder: vite\r\n- User Config: ssr, devtools, imports, modules, css, svgo, i18n, headlessui, image, components, extends, runtimeConfig, linkChecker, googleFonts, build, vite, nitro\r\n- Runtime Modules: @nuxtjs/eslint-module@4.1.0, @pinia/nuxt@0.4.11, @nuxtjs/i18n@8.0.0-rc.2, nuxt-svgo@3.4.0, nuxt-headlessui@1.1.4, @nuxt/image@1.0.0-rc.1, nuxt-typed-router@3.2.5, @formkit/nuxt@0.17.5, @nuxtjs/tailwindcss@6.8.0, nuxt-icon@0.4.2, @nuxtjs/google-fonts@3.0.2, @vueuse/nuxt@10.3.0\r\n- Build Modules: -\r\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-ntrsan-qorvzj?file=app.vue\r\n\r\n1. Make pinia store with function for example \"fetchData\" that returns `useFetch('some-endpoint')`\r\n2. Use store inside `script setup` and call `store.fetchData`\r\n3. Try to render data returned from `store.fetchData` in the template\r\n4. Data remains undefined\n\n### Describe the bug\n\nUseFetch doesn't work if it's inside pinia store, despite its invocation from within the \u003Cscript setup> section.\r\n\r\nI like to keep my API calls in pinia modules. For example all API calls related to user would be in user.ts pinia module. Unfortunately I realized that it's not possible when using `useFetch` Nuxt composable. Could this be considered a bug, or is it an intentional behavior?\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2039,2040],{"name":2028,"color":2029},{"name":1985,"color":1986},22549,"UseFetch doesn't work if it's inside pinia store, despite its invocation from within the \u003Cscript setup> section","2023-08-09T10:36:06Z","https://github.com/nuxt/nuxt/issues/22549",0.6936529,{"description":2047,"labels":2048,"number":2050,"owner":1988,"repository":1988,"state":2020,"title":2051,"updated_at":2052,"url":2053,"score":2054},"### 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```",[2049],{"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.6944156,{"description":2056,"labels":2057,"number":2061,"owner":1988,"repository":2062,"state":2020,"title":2063,"updated_at":2064,"url":2065,"score":2066},"It is described in the Pinia testing to do this for testing with a Pinia store:\r\nhttps://pinia.vuejs.org/cookbook/testing.html\r\n```\r\nimport { setActivePinia, createPinia } from 'pinia'\r\nimport { useCounterStore } from '../src/stores/counter'\r\n\r\ndescribe('Counter Store', () => {\r\n beforeEach(() => {\r\n // creates a fresh pinia and make it active so it's automatically picked\r\n // up by any useStore() call without having to pass it to it:\r\n // `useStore(pinia)`\r\n setActivePinia(createPinia())\r\n })\r\n...\r\n```\r\n\r\nHowever because my plugin & module created pinia stores, this is too late.\r\n\r\nFor now, I've adjusted my plugin\r\n```\r\nimport { setActivePinia, createPinia } from 'pinia'\r\nimport { addRouteMiddleware, defineNuxtPlugin } from '#app'\r\nimport CwaRouteMiddleware from '#cwa/runtime/route-middleware'\r\nimport Cwa from '#cwa/runtime/cwa'\r\nimport { options } from '#build/cwa-options'\r\n\r\nexport default defineNuxtPlugin({\r\n name: 'cwa-plugin',\r\n enforce: 'pre',\r\n setup (nuxtApp) {\r\n if (process.env.NODE_ENV === 'test') {\r\n setActivePinia(createPinia())\r\n }\r\n addRouteMiddleware('cwa', CwaRouteMiddleware, { global: true })\r\n return {\r\n provide: {\r\n cwa: new Cwa(nuxtApp, options)\r\n }\r\n }\r\n },\r\n hooks: {}\r\n})\r\n```\r\n\r\nSo I can set the active pinia store without causing an error when starting the nuxt environment. Is this the preferred way to do this or is there a better DX to be had when testing a module which is using pinia stores?",[2058],{"name":2059,"color":2060},"vitest-environment","b60205",571,"test-utils","Testing with a Pinia store best practices","2023-12-02T00:32:09Z","https://github.com/nuxt/test-utils/issues/571",0.6985304,{"description":2068,"labels":2069,"number":2072,"owner":1988,"repository":1988,"state":2020,"title":2073,"updated_at":2074,"url":2075,"score":2076},"### 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_",[2070,2071],{"name":2028,"color":2029},{"name":1985,"color":1986},26456," 3.11.1 Pinia not working","2024-03-25T07:44:43Z","https://github.com/nuxt/nuxt/issues/26456",0.7007036,{"description":2078,"labels":2079,"number":2082,"owner":1988,"repository":1988,"state":2020,"title":2083,"updated_at":2084,"url":2085,"score":2086},"### Environment\r\n\r\nWorking directory: /home/projects/nuxt-starter-yss3ry 11:17:50 pm\r\nNuxt project info: 11:17:50 pm\r\n\r\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v18.18.0\r\n- Nuxt Version: 3.8.0\r\n- CLI Version: 3.9.1\r\n- Nitro Version: 2.7.0\r\n- Package Manager: npm@9.4.2\r\n- Builder: -\r\n- User Config: ssr, modules, vite, devtools\r\n- Runtime Modules: @pinia/nuxt@0.5.1\r\n- Build Modules: -\r\n------------------------------\r\n\r\n> Note: I tried downgrading to Nuxt 3.6 and 3.5, still same issue.\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/nuxt-starter-yss3ry?file=pages%2Ffruits.vue\r\n\r\nYou need to run:\r\n```sh\r\nnpm install && npm run generate && pnpm run preview\r\n```\r\n\r\nIn `npm run dev` mode, there is no issue. Only when in static preview mode after payload extraction.\r\n\r\n### Minimal reproduction code [@ stackblitz](https://stackblitz.com/edit/nuxt-starter-yss3ry?file=pages%2Ffruits.vue)\r\n```vue\r\n\u003Ctemplate>\r\n \u003Cmain>\r\n \u003Ch1>fruits.vue page\u003C/h1>\r\n \u003Cp v-if=\"pending\">Loading...\u003C/p>\r\n \u003Cp v-else>fruits: {{ fruits }}\u003C/p>\r\n\r\n \u003Cbr/>\r\n \u003Cbr/>\r\n\r\n \u003Cp>The problem is: \u003Cbr/>\r\n - If you navigate directly to this page, the data is set.\u003Cbr/>\r\n - If you navigate to this page from the home page, the data is NOT set. \r\n \u003Cstrong>That's the bug!\u003C/strong>\r\n \u003C/p>\r\n\r\n \u003Cp>\r\n \u003Cnuxt-link to=\"/\">Home\u003C/nuxt-link>\r\n \u003C/p>\r\n \u003C/main>\r\n\u003C/template>\r\n\r\n\u003Cscript setup>\r\nimport { storeToRefs } from \"pinia\";\r\nimport { useExampleStore } from \"~/stores/example\";\r\n\r\nconst exampleStore = useExampleStore();\r\n\r\nconst { getData } = exampleStore;\r\nconst { fruits } = storeToRefs(exampleStore);\r\n\r\nconst { data, pending, error } = useAsyncData(\"get-fruits\", getData);\r\nconsole.log(\">>> THIS IS SET: data.value\", data.value)\r\nconsole.log(\">>> THIS IS **NOT** SET when navigating from /: fruits.value\", fruits.value)\r\n\r\n// debugging payload\r\n// payload still shows the landing page when this is triggered, so the payload was not updated either\r\nonMounted(() => {\r\n const { payload } = useNuxtApp();\r\n //console.log(\"> >>> Payload: \", payload);\r\n console.log(\"> >>> Payload path >>> \", payload.path);\r\n});\r\n \u003C/script>\r\n```\r\n\r\n### Describe the bug\r\n\r\n#### The bug: \r\n- If you start navigation from `/`, then click the nuxt-link to `/fruits`, the pinia store is empty.\r\n- If you start directly at `/fruits` or reload the page, the pinia store is hydrated correctly.\r\n\r\n#### Expected behavior: \r\nFor the payload to hydrate the pinia store in both cases: Navigating directly to `/fruits` page (same as reloading the page), vs starting at root `/` then navigating to `/fruits` page. The should both hydrate the store.\r\n\r\n#### Also noticed: useNuxtApp().payload does not update between page changes. \r\nIt remains stuck at the first page loaded, in this example `/` will be the payload loaded, not `/fruits`.\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\nConsole output when you start at `/` then navigate to `/fruits by clicking the link`:\r\n\r\n>>> THIS IS SET: data.value \r\nProxy { \u003Ctarget>: {…}, \u003Chandler>: {…} }\r\n>>> THIS IS **NOT** SET when navigating from /: fruits.value \r\nArray [] \u003C-- the should have 3 fruits!\r\n> >>> Payload path >>> / \u003C-- Notice, the payload.path still `/`\r\n\r\n---\r\n\r\nConsole output when reloading directly `/fruits/`:\r\n\r\n>>> THIS IS SET: data.value \r\nProxy { \u003Ctarget>: {…}, \u003Chandler>: {…} }\r\n>>> THIS IS **NOT** SET when navigating from /: fruits.value \u003C-- 3 fruits, correct\r\nProxy { \u003Ctarget>: (3) […], \u003Chandler>: {…} }\r\n> >>> Payload path >>> /fruits \u003C--- it's correct\r\n```\r\n",[2080,2081],{"name":2028,"color":2029},{"name":1985,"color":1986},23800,"Bug using useAsyncData with ssr: true. Pinia not updated from payload.","2023-11-15T12:56:11Z","https://github.com/nuxt/nuxt/issues/23800",0.70171463,{"description":2088,"labels":2089,"number":2092,"owner":1988,"repository":1988,"state":2020,"title":2093,"updated_at":2094,"url":2095,"score":2096},"### Environment\n\n- Operating System: Darwin\r\n- Node Version: v18.16.0\r\n- Nuxt Version: 3.6.1\r\n- Nitro Version: 2.5.1\r\n- Package Manager: npm@9.4.0\r\n- Builder: vite\r\n- User Config: modules, imports\r\n- Runtime Modules: @pinia/nuxt@0.4.11\r\n- Build Modules: -\n\n### Reproduction\n\nhttps://stackblitz.com/edit/nuxt-starter-vibihh?file=pages%2Findex.vue,store%2Fwallet.ts\n\n### Describe the bug\n\nI want to modify the value of `isSetOption` to `true` in the `wallet store` by listening to the completion of asynchronous operations in the `chain store`. However, the final result is `false`, and there is no operation in my code to set `isSetOption.value` to `false`.\n\n### Additional context\n\nAlthough the maintainers of Pinia have provided me with a [solution](https://github.com/vuejs/pinia/issues/2285#issuecomment-1612535520) to this issue, I am not sure if it is a bug in Nuxt. So, if this is not a bug, feel free to close the issue.\n\n### Logs\n\n_No response_",[2090,2091],{"name":2028,"color":2029},{"name":1985,"color":1986},21858,"watching asynchronous data can lead to inconsistent values in the store","2023-06-29T08:28:17Z","https://github.com/nuxt/nuxt/issues/21858",0.7033915,["Reactive",2098],{},["Set"],["ShallowReactive",2101],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"8yoGAhmrn8-2Cy33G7A_h_kgbBVkHTMBtlihLuX2ZgA":-1},"/nuxt/ui/3452"]