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

Error when using it with JSPM #3

Open
radenkozec opened this issue Jan 18, 2018 · 4 comments
Open

Error when using it with JSPM #3

radenkozec opened this issue Jan 18, 2018 · 4 comments

Comments

@radenkozec
Copy link

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
Copy link
Owner

istrau2 commented Jan 18, 2018

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
Copy link
Author

@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
Copy link
Owner

istrau2 commented Jan 19, 2018

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
Copy link

I've got the same issues

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

3 participants