-
Notifications
You must be signed in to change notification settings - Fork 53
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
TypeError: this.flatpickrElement.nativeElement.flatpickr is not a function in prod build #47
Comments
Please provide a more detailed reproduction. Closing until then. |
When I'm using this while developing, everything works fine, but when i compile the application as prod mode, i get the following error:
As far as I can debug, i get the error is being thrown in the ngAfterViewInit:
I don't know what changes between dev and prod mode to cause this error, or even if its related to the thread, but solving it would be great |
I got the same error. When I use "ng serve" to run my angular app, it runs fine but here the error message note: I'm using angular 7 |
@pjl1983 @Lonking1990 you'll need to upgrade your project to Angular 8 or you can downgrade |
Try adding an |
ERROR { TypeError: this.flatpickrElement.nativeElement.flatpickr is not a function at Ng2FlatpickrComponent.ngAfterViewInit (/usr/src/project/node_modules/ng2-flatpickr/bundles/~/ng2-flatpickr/src/ng2-flatpickr.component.ts:58:56) at callProviderLifecycles (/usr/src/project/node_modules/packages/core/esm5/src/view/provider.js:591:9) at callElementProvidersLifecycles (/usr/src/project/node_modules/packages/core/esm5/src/view/provider.js:558:12) at callLifecycleHooksChildrenFirst (/usr/src/project/node_modules/packages/core/esm5/src/view/provider.js:541:2) at checkAndUpdateView (/usr/src/project/node_modules/packages/core/esm5/src/view/view.js:400:5) at callViewAction (/usr/src/project/node_modules/packages/core/esm5/src/view/view.js:742:14) at execComponentViewsAction (/usr/src/project/node_modules/@angular/core/bundles/core.umd.js:14123:13) at checkAndUpdateView (/usr/src/project/node_modules/@angular/core/bundles/core.umd.js:13846:5) at callViewAction (/usr/src/project/node_modules/packages/core/esm5/src/view/view.js:742:14) at execComponentViewsAction (/usr/src/project/node_modules/@angular/core/bundles/core.umd.js:14123:13) at checkAndUpdateView (/usr/src/project/node_modules/@angular/core/bundles/core.umd.js:13846:5) at callViewAction (/usr/src/project/node_modules/packages/core/esm5/src/view/view.js:742:14) at execEmbeddedViewsAction (/usr/src/project/node_modules/@angular/core/bundles/core.umd.js:14149:17) at checkAndUpdateView (/usr/src/project/node_modules/packages/core/esm5/src/view/view.js:392:5) at callViewAction (/usr/src/project/node_modules/packages/core/esm5/src/view/view.js:742:14) at execComponentViewsAction (/usr/src/project/node_modules/@angular/core/bundles/core.umd.js:14123:13)
The text was updated successfully, but these errors were encountered: