[3.0.0-rc.14] Pinia is not working with rc.14
See original GitHub issueEnvironment
- Operating System:
Linux
- Node Version:
v18.4.0
- Nuxt Version:
3.0.0-rc.14
- Nitro Version:
1.0.0
- Package Manager:
yarn@3.2.0
- Builder:
vite
- User Config:
sourcemap
,imports
,experimental
,css
,modules
,app
,typescript
,nitro
,buildModules
,build
,plugins
,vite
,runtimeConfig
,routeRules
- Runtime Modules:
normalizedModule()
,normalizedModule()
,normalizedModule()
- Build Modules:
@pinia/nuxt@0.4.3
Reproduction
no reproduction yet
Describe the bug
After upgrading to rc.14 (with rc.13 everything was ok) pinia in our project is not working. Trying to access any page that uses pinia throws error:
[🍍]: getActivePinia was called with no active Pinia. Did you forget to install pinia?
const pinia = createPinia()
app.use(pinia)
This will fail in production.
at Module.useStore (./node_modules/pinia/dist/pinia.mjs:1696:19)
at __vite_ssr_exports__.default (./composables/use-cookie-store-watcher/index.ts:12:45)
at setup (./layouts/default.vue:41:34)
Also this can be found in server logs:
[Vue warn]: injection "Symbol(pinia)" not found. 12:36:42
[Vue warn]: Unhandled error during execution of setup function 12:36:42
at <Default > // this is default layout probably
[Vue warn]: injection "Symbol(pinia)" not found. 12:36:42
[Vue warn]: Unhandled error during execution of setup function 12:36:42
at <Szukaj > // this is page name
I already tried with newest versions of @pinia/nuxt (0.4.3) and pinia (2.0.23) packages but it’s still not working.
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created 10 months ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
pinia-plugin-persist - CodeSandbox
Zsapi/pinia-plugin-persist-repro. Environmentnode. This sandbox is in sync with main on GitHub. You have to fork to make changes
Read more >Using vue-chartjs (4.1.1) in Nuxt (3.0.0-rc.4) doesn't build
In my app the pie chart is fed with props and reacts nicely to user inputs. I just can't deploy it for some...
Read more >Installation - Pinia
import { createApp } from 'vue' import { createPinia } from 'pinia' import App ... In Vue 3, some features like time traveling...
Read more >vuex | Yarn - Package Manager
Pinia has almost the exact same or enhanced API as Vuex 5, described in Vuex 5 RFC. ... Pinia also works with Vue...
Read more >cannot find module' or its corresponding type declarations vue
This might be an IDE issue that fails to reload node_module index information. ... @vue/test-utils-next library which was introduced in 2.0.0-rc.14 version.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
it seems like putting
@pinia/nuxt
frombuildModules
tomodules
fixed it for meSame error, and when I try to deploy as a static site I got this:
ERROR [🍍]: getActivePinia was called with no active Pinia. Did you forget to install pinia? const pinia = createPinia() app.use(pinia) This will fail in production.