Ionic version: (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x] 3.x
[ ] 4.x
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
Current behavior:
import {TranslateService} from '@ngx-translate/core'; ngx-translate/core package went missing, npm install fixed this package issueionic serve worked
Error
Runtime Error
Object(...) is not a function
Expected behavior:
After upgrade, there shouldn't be a runtime error;
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
Runtime Error
Object(...) is not a function
Stack
TypeError: Object(...) is not a function
at TranslateService.get (http://localhost:8100/build/vendor.js:67817:72)
at TranslatePipe.updateValue (http://localhost:8100/build/vendor.js:68090:24)
at TranslatePipe.transform (http://localhost:8100/build/vendor.js:68123:14)
at Object.eval [as updateDirectives] (ng:///AppModule/TabsPage.ngfactory.js:73:13)
at Object.debugUpdateDirectives [as updateDirectives] (http://localhost:8100/build/vendor.js:14692:21)
at checkAndUpdateView (http://localhost:8100/build/vendor.js:13861:14)
at callViewAction (http://localhost:8100/build/vendor.js:14211:21)
at execComponentViewsAction (http://localhost:8100/build/vendor.js:14143:13)
at checkAndUpdateView (http://localhost:8100/build/vendor.js:13867:5)
at callViewAction (http://localhost:8100/build/vendor.js:14211:21)
Ionic Framework: 3.9.0
Ionic Native: ^2.9.0
Ionic App Scripts: 3.1.8
Angular Core: 5.0.0
Angular Compiler CLI: 5.0.0
Node: 9.4.0
OS Platform: macOS High Sierra
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
cli packages: (/Users/[username]/apps/[projectname]/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : ios 4.5.4
Ionic Framework : ionic-angular 3.9.0
System:
ios-deploy : 1.9.2
Node : v9.4.0
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 9.3 Build version 9E145
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
What version of the the ngx-translate/core are you using?
Version 10 and up have breaking changes. (https://github.com/ngx-translate/core/releases)
And since Ionic is not yet supporting angular 6 you need to stay at version 9.1.1 for the core and 2.0.1 for the HTTP-loader and if you use the rxjs library as well keep that on 5.5.0
I imported angular translate into each submodules and it works now.
Thanks for helping!
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
What version of the the ngx-translate/core are you using?
Version 10 and up have breaking changes. (https://github.com/ngx-translate/core/releases)
And since Ionic is not yet supporting angular 6 you need to stay at version 9.1.1 for the core and 2.0.1 for the HTTP-loader and if you use the rxjs library as well keep that on 5.5.0