composition-api
composition-api copied to clipboard
[Vue warn]: The setup binding property "formatSettingsExpand" is already declared.
<script>
import { defineComponent, ref } from '@nuxtjs/composition-api'
export default defineComponent({
setup() {
const formatSettingsExpand = ref(false)
return {
formatSettingsExpand,
}
}
})
</script>
- I tried all of the solutions from this issue but they are not working - https://github.com/vuejs/composition-api/issues/213
Would you provide a reproduction? 🙏
I know this is an old issue, but just in case someone comes along looking for an answer: in my case it's because I'm working while overtired and inattentive and at some point I installed @nuxt/composition-api on top of @vue/composition-api. Nuxt includes the second one as a dependency, no need to do that; it was loading twice, hence the error.
Long story short, in my case it was a PEBKAC... I guess check your package.json and make sure you include only one?
We will have to assume that the initial issue was the same because it doesn't reproduce here in a minimal setup.