In my case this error popped up when I was trying to use a Pinia store in another store's action.
Moving the line const overviewStore = useOverviewStore() into a component instead solved the issue
const overviewStore = useOverviewStore()