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

TypeError: Object(...) is not a function #173

Closed
codeunifier opened this issue Jul 17, 2019 · 4 comments
Closed

TypeError: Object(...) is not a function #173

codeunifier opened this issue Jul 17, 2019 · 4 comments

Comments

@codeunifier
Copy link

codeunifier commented Jul 17, 2019

Hi! I'm getting the following error when trying to import module into my app:

Error:
Error: Uncaught (in promise): TypeError: Object(...) is not a function
TypeError: Object(...) is not a function
at ngx-material-timepicker.js:231
at Module../node_modules/ngx-material-timepicker/fesm5/ngx-material-timepicker.js (ngx-material-timepicker.js:238)
at webpack_require (bootstrap:83)
....

@Zozu
Copy link
Contributor

Zozu commented Jul 18, 2019

Yeah, I got this too. Seems, like there is an issue in build. Module tries to import something strange from '@angular/core' ('ɵɵdefineInjectable').
image
I changed it to 'defineInjectable' in '/node_modules/ngx-material-timepicker/fesm5/ngx-material-timepicker.js' and now it works.
It's need to fix this in the repo.

@Zozu
Copy link
Contributor

Zozu commented Jul 18, 2019

Seems like this error related to the updates in Angular v8. 'defineInjectable' is deprecated and changed to 'ɵɵdefineInjectable'. This change breaks backward compatibility with lower versions of Angular.
Seems like you use (and me too) Angular version lower than 8.
Angular has closed issue for this case: angular/angular#30413

@Zozu
Copy link
Contributor

Zozu commented Jul 18, 2019

Just use version 3.3.1 of "ngx-material-timepicker" if you got this error.

@Agranom
Copy link
Owner

Agranom commented Jul 19, 2019

It might help #158

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