You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I’m working on a Nuxt project that extends a remote Nuxt layer. The layer includes Pinia and defines stores in its stores directory. However, the stores are not accessible in my project, and they don’t appear in the .nuxt folder after running nuxt prepare.
Here’s what I’ve tried:
Added the following Pinia configuration in the layer’s nuxt.config.ts:
Verified that the stores directory exists in the layer and contains valid Pinia stores.
Cleared caches and rebuilt the project (rm -rf .nuxt node_modules && npm install && npm run dev).
Despite this, the stores are not accessible in my project, and I get errors like useUserStore is not defined.
How can I properly configure Pinia within a Nuxt layer so that the stores are accessible in the extending project? Is there a specific way to expose the stores directory from the layer?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I’m working on a Nuxt project that extends a remote Nuxt layer. The layer includes Pinia and defines stores in its stores directory. However, the stores are not accessible in my project, and they don’t appear in the .nuxt folder after running nuxt prepare.
Here’s what I’ve tried:
Despite this, the stores are not accessible in my project, and I get errors like useUserStore is not defined.
How can I properly configure Pinia within a Nuxt layer so that the stores are accessible in the extending project? Is there a specific way to expose the stores directory from the layer?
Any guidance would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions