istrau2 / aurelia-flatpickr

An aurelia flatpickr custom element
Creative Commons Zero v1.0 Universal
5 stars 1 forks source link

Error when using it with JSPM #3

Open radenkozec opened 6 years ago

radenkozec commented 6 years ago

I'm submitting a bug report

Current behavior: On JSPM I am getting this error when try to call it with defaults: aurelia-flatpickr.js:99 Uncaught (in promise) TypeError: _flatpickr2.default is not a constructor at AureliaFlatpickrCustomElement.attached (aurelia-flatpickr.js:99) at Controller.attached (aurelia-templating.js:3513) at View.attached (aurelia-templating.js:1563) at Controller.attached (aurelia-templating.js:3517) at DialogRenderer.attach (dialog-renderer.js:132) at DialogRenderer.showDialog (dialog-renderer.js:208) at eval (dialog-service.js:78) at

istrau2 commented 6 years ago

Hey,

Just looking at the error, it seems that you have not included the actual flatpickr library (js and css file) in your project. Could that be your issue?

radenkozec commented 6 years ago

@istrau2 Not quite. Actually I have installed it using JSPM install NPM:flatpickr. I guess that you have route to the flatpickr library hardcoded for WebPack and node_modules folder and my library actually is installed in jspm_packages/npm folder when using JSPM.

istrau2 commented 6 years ago

Ah, ok. I understand the issue. Well, this feels like something that needs to be solved in the bundler. For example, I know in webpack, you can alias a file so that 'flatpickr' resolves to '/path/to/flatpickr'. Do you have some other idea?

PhilippBaranovskiy commented 6 years ago

I've got the same issues