Open wishinghand opened 5 years ago
which vue version are you using?
Sorry, forgot that important detail. Vue: 2.5.22 Vue2Leaflet: 1.0.2 vue2-leaflet-polylinedecorator: 2.0.1
Switching from Yarn to NPM seemed to have solved this, though no idea why it did.
I am having same issues, I don't know why?
Same here, guys. Using yarn on this case:
vue.runtime.esm.js?2b0e:1888 TypeError: o.default.polylineDecorator is not a function at VueComponent.mounted (Vue2LeafletPolylinedecorator.js?1cdc:1) at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1854) at callHook (vue.runtime.esm.js?2b0e:4219) at Object.insert (vue.runtime.esm.js?2b0e:3139) at invokeInsertHook (vue.runtime.esm.js?2b0e:6346) at VueComponent.patch [as __patch__] (vue.runtime.esm.js?2b0e:6565) at VueComponent.Vue._update (vue.runtime.esm.js?2b0e:3948) at VueComponent.updateComponent (vue.runtime.esm.js?2b0e:4066) at Watcher.get (vue.runtime.esm.js?2b0e:4479) at Watcher.run (vue.runtime.esm.js?2b0e:4554)
I am having same issues, I don't know why?
use npm instead of yarn
不要用cnpm
Anyone seen this error crop up? Everything was working fine until it wasn't. I haven't upgraded any Leaflet packages, though I recently did update Vue and vue-template-compiler to match each other's version. Everything on my Leaflet map works fine except for the arrowheads that I'm drawing with this polyline decorator. Error is as follows:
[Vue warn]: Error in mounted hook: "TypeError: o.default.polylineDecorator is not a function"
I'm importing this package like so:
import GateArrow from 'vue2-leaflet-polylinedecorator'
and using it here:
Where
paths
is a two pairs of coordinates for a line segment to be the arrow body, andpatterns
is the arrowhead, defined as: