composition-api icon indicating copy to clipboard operation
composition-api copied to clipboard

[Vue warn]: The setup binding property "formatSettingsExpand" is already declared.

Open sumon-devxhub opened this issue 2 years ago • 1 comments

<script>
import { defineComponent, ref } from '@nuxtjs/composition-api'
export default defineComponent({
   setup() {
      const formatSettingsExpand = ref(false)
      return {
         formatSettingsExpand,
      }
   }
})
</script>

error

sumon-devxhub avatar Sep 13 '22 16:09 sumon-devxhub

Would you provide a reproduction? 🙏

danielroe avatar Sep 14 '22 08:09 danielroe

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?

cdwieber avatar Mar 08 '23 21:03 cdwieber

We will have to assume that the initial issue was the same because it doesn't reproduce here in a minimal setup.

rchl avatar Mar 30 '23 19:03 rchl