title: Vuejs 3 Pinia not working, Cannot read properties of undefined (reading 'startsWith')
body: <p>I try to use Pinia but it never works. Doesn't matter if I install it with Vite at the start of the project or if I add it later. It always write the same error. This is an example from my last project.</p>
  <p><a href="https://i.stack.imgur.com/fT6Ea.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fT6Ea.png" alt="enter image description here" /></a></p>
  <p>This is my main.js</p>
  <pre><code>import { createApp } from &quot;vue&quot;;
  import { createPinia } from &quot;pinia&quot;;
  import App from &quot;./App.vue&quot;;
  import draggable from &quot;vuedraggable&quot;;
  
  const app = createApp(App);
  
  app.use(createPinia());
  app.component('draggable', draggable);
  app.mount(&quot;#app&quot;);
  
  </code></pre>
  <p>This is start of my App.vue</p>
  <pre><code>&lt;script setup&gt;
  import { ref } from &quot;vue&quot;;
  import draggable from &quot;vuedraggable&quot;;
  import {useCounterStore} from &quot;./stores/counter&quot;;
  const storeCounter = useCounterStore();
  </code></pre>
  <p>The error appears when I enter</p>
  <pre><code>const storeCounter = useCounterStore();
  </code></pre>