vinayakkulkarni / v-mapbox

Vue-ish way for interacting with map(box|libre)-gl-js 🧭
https://v-mapbox.netlify.app/
MIT License
185 stars 45 forks source link

The setup binding property "templateRefs" is already declared (vuejs2 legacy version) #1293

Closed kor3k closed 1 year ago

kor3k commented 1 year ago

hello, i can't get it working.

i am using

"v-mapbox": "^1.11.2"

like this

<template>
  <MglMap
      :access-token="accessToken"
      :map-style.sync="style"
  ></MglMap>
</template>

<script>
import 'mapbox-gl/dist/mapbox-gl.css'
import 'v-mapbox/dist/v-mapbox.css'
import Mapbox from 'mapbox-gl'
import VMap from 'v-mapbox'
Vue.use(VMap)
</script>

and i got this error

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

found in

---> <MglMap>

any idea what i am doing wrong?

dirksierd commented 1 year ago

Hi @kor3k, I stumbled upon this as well. On my end this was related to using Vue 2.7, which has the composition-api features of Vue 3 backported. Rolling back to Vue 2.6 fixed the issue for me.

kor3k commented 1 year ago

@dirksierd hello. thank you for hinting that. unfortunately that rollback to vue 2.6 is a not an option for me.. but it seems like the only solution, so i close this.