vuejs / composition-api

Composition API plugin for Vue 2

Home Page:https://composition-api.vuejs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The setup binding property "xxx" is already declared.

youuss opened this issue · comments

commented

hi, when i use vue2.6.11 with @vue/composition-api@1.7.0, i got a vue warnning The setup binding property "test" is already declared.. I also provide a simple demo in https://codesandbox.io/s/objective-cohen-qf0uxk
plz check that, thx

Your reproduction uses vue 2.7.x and it conflicts with composition api plugin, so either remove the plugin or use vue 2.6.x

commented

Your reproduction uses vue 2.7.x and it conflicts with composition api plugin, so either remove the plugin or use vue 2.6.x

image

I just find vue 2.6.x

Maybe you need to check the vue version in node_modules actually has been installed. if the version >= 2.7, you just need to import from vue, when the version < 2.7, you need to follow the @vue/composition-api md steps.

commented

把^2.6.11的^去掉,否则会下载2.7.x

commented

把^2.6.11的^去掉,否则会下载2.7.x

嗯 但是老项目 不锁版本直接去install,如果不关注node_modules很容易产生类似情况