Skip to content

@pinia/nuxt: getActivePinia was called with no active Pinia #806

Closed Answered by bencodezen
findtoni asked this question in Help and Questions
Discussion options

You must be logged in to vote

Okay so I think I figured out the issue that causes this. Not sure if this is directly related to the original post, but since I couldn't understand why it seemed to work in some cases and not others, I finally narrowed it down to a reproducible repo:

https://github.com/bencodezen/nuxt-3-sandbox

The interesting part is that this error doesn't show up in nuxi dev at all. It only shows up on build and my guess is that it's likely because of how it's being compiled.

When you run npm run build on this, this is where you'll see that error appear every time. And from my debugging so far, it's happening when a dev tries to setup a second store and calls it within another outside of the context o…

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@posva
Comment options

Comment options

You must be logged in to vote
5 replies
@posva
Comment options

@bencodezen
Comment options

@martinszeltins
Comment options

@Alqua
Comment options

@JaidenDeChon
Comment options

Answer selected by findtoni
Comment options

You must be logged in to vote
1 reply
@martinszeltins
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need repro This issue couldn't be reproduced
7 participants
Converted from issue

This discussion was converted from issue #805 on November 17, 2021 16:50.