Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

o.default.polylineDecorator is not a function #2

Open
wishinghand opened this issue Jan 17, 2019 · 7 comments
Open

o.default.polylineDecorator is not a function #2

wishinghand opened this issue Jan 17, 2019 · 7 comments

Comments

@wishinghand
Copy link

wishinghand commented Jan 17, 2019

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:

<gate-arrow
  :paths="gate.coordinates"
  :patterns="arrowPattern"
/>

Where paths is a two pairs of coordinates for a line segment to be the arrow body, and patterns is the arrowhead, defined as:

arrowPattern: [{
  offset: '100%',
  repeat: 0,
  symbol: L.Symbol.arrowHead({
    pixelSize: 15,
    polygon: false,
    pathOptions: { stroke: true }
  })
}]
@jperelli
Copy link
Owner

which vue version are you using?

@wishinghand
Copy link
Author

Sorry, forgot that important detail.
Vue: 2.5.22
Vue2Leaflet: 1.0.2
vue2-leaflet-polylinedecorator: 2.0.1

@wishinghand
Copy link
Author

Switching from Yarn to NPM seemed to have solved this, though no idea why it did.

@MrJSdev
Copy link

MrJSdev commented Mar 26, 2020

I am having same issues, I don't know why?

@gaspo53
Copy link

gaspo53 commented Apr 21, 2020

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)

@Cheerwhy
Copy link

I am having same issues, I don't know why?

use npm instead of yarn

@Cheerwhy
Copy link

不要用cnpm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants