NuxtN
Nuxtβ€’15mo ago
Neamix

Cant access pinia from component

I am trying to access my store from component but i am getting that error
[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"? See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help. This will fail in production.


if i called my store from page it work but if i called it from store it not here is my component code

<template>
    <div class="dropdown w-full m-auto rounded-[16px] overflow-hidden register-card absolute bg-white left-0 top-14 border border-gray-200 ">
        <slot name="items"></slot>
    </div>
</template>

<script>
// import { useRegisterStore } from '@/stores/register';

let registerStore = useRegisterStore();
</script>
Was this page helpful?