Jovan Kočić
Jovan Kočić
NNuxt
Created by Jovan Kočić on 2/14/2025 in #❓・help
Pinia store with Nuxt layers
We have an issue with the Pinia store when it is used in the Nuxt layers. The error is:
[nuxt] error caught during app initialization Error: [🍍]: "getActivePinia()" was called but there was no active Pinia.
[nuxt] error caught during app initialization Error: [🍍]: "getActivePinia()" was called but there was no active Pinia.
The layer is part of the monorepo, and when used within the monorepo, it works. It also works when it is used in the other project, by extending it via Github like:
extends: [
['github:repo/Layer#master'],
],
extends: [
['github:repo/Layer#master'],
],
but when we try to use it locally, it fails
extends: [
['/some/local/path/repo/Layer'],
],
extends: [
['/some/local/path/repo/Layer'],
],
Here is the GH discussion: https://github.com/vuejs/pinia/discussions/2378#discussioncomment-12096928
10 replies