The general meaning is that script setup cannot be exported using ES modules
In fact, the problem lies in the mixed use of the official methods.
One is: <script>
configuration in the label setup
The other is: the configuration method export default
in the class setup()
Just use one of the two
The first
<script setup> import {useStore} from "../stores/store.js"; const store = useStore(); </script>
the second
<script> import { defineComponent } from 'vue' import {useStore} from "../stores/store.js"; export default defineComponent({ setup() { const store = useStore(); return { store, } } }) </script>