I tested with a clean Ionic start blank project and it is able to build successfully. Upon careful checking it may have something to do with TranslateModule from @ngx-translate/core. Commenting out the TranslateModule in the module.ts makes the error go away, but breaks all the translation pipe.
package.json
{
"name": "Starter",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "4.1.3",
"@angular/compiler": "4.1.3",
"@angular/compiler-cli": "4.1.3",
"@angular/core": "4.1.3",
"@angular/forms": "4.1.3",
"@angular/http": "4.1.3",
"@angular/platform-browser": "4.1.3",
"@angular/platform-browser-dynamic": "4.1.3",
"@ionic-native/camera": "^3.12.1",
"@ionic-native/core": "3.12.1",
"@ionic-native/facebook": "^3.12.1",
"@ionic-native/file": "^3.12.1",
"@ionic-native/google-plus": "^3.12.1",
"@ionic-native/keyboard": "^3.12.1",
"@ionic-native/network": "^3.12.1",
"@ionic-native/splash-screen": "3.12.1",
"@ionic-native/status-bar": "3.12.1",
"@ionic-native/twitter-connect": "^3.12.1",
"@ionic/cloud-angular": "^0.12.0",
"@ionic/storage": "2.0.1",
"@ngx-translate/core": "^7.0.0",
"@ngx-translate/http-loader": "^0.1.0",
"angularfire2": "^4.0.0-rc.1",
"chart.js": "^2.6.0",
"cordova-android": "^6.2.3",
"cordova-ios": "^4.4.0",
"cordova-plugin-camera": "^2.4.1",
"cordova-plugin-compat": "^1.1.0",
"cordova-plugin-console": "^1.0.7",
"cordova-plugin-crosswalk-webview": "^2.3.0",
"cordova-plugin-device": "^1.1.6",
"cordova-plugin-facebook4": "^1.9.1",
"cordova-plugin-file": "^4.3.3",
"cordova-plugin-googleplus": "^5.1.1",
"cordova-plugin-network-information": "^1.3.3",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.2.3",
"cordova-plugin-whitelist": "^1.3.2",
"cordova-plugin-wkwebview-engine": "git+https://github.com/driftyco/cordova-plugin-wkwebview-engine.git",
"cordova-sqlite-storage": "^2.0.4",
"firebase": "^4.1.3",
"ionic-angular": "3.4.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"phonegap-plugin-push": "^1.10.5",
"promise-polyfill": "6.0.2",
"rxjs": "5.4.0",
"sw-toolbox": "3.6.0",
"twitter-connect-plugin": "^0.6.0",
"zone.js": "0.8.12"
},
"devDependencies": {
"@ionic/app-scripts": "2.1.4",
"typescript": "2.3.4"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-camera": {
"CAMERA_USAGE_DESCRIPTION": " ",
"PHOTOLIBRARY_USAGE_DESCRIPTION": " "
},
"cordova-plugin-facebook4": {
"APP_ID": "",
"APP_NAME": "Starter"
},
"cordova-plugin-file": {},
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": ""
},
"cordova-plugin-network-information": {},
"twitter-connect-plugin": {
"FABRIC_KEY": ""
},
"cordova-sqlite-storage": {},
"cordova-plugin-wkwebview-engine": {},
"phonegap-plugin-push": {
"SENDER_ID": ""
},
"cordova-plugin-crosswalk-webview": {}
},
"platforms": [
"android"
]
}
}
Sorry, my apologies, welcome page is an intro page with some ion-slide with css animation.
welcome.ts
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, Platform } from 'ionic-angular';
import { AnimationProvider } from '../../providers/animation';
@IonicPage()
@Component({
selector: 'page-welcome',
templateUrl: 'welcome.html',
})
export class WelcomePage {
constructor(public navCtrl: NavController,
public navParams: NavParams,
private animation: AnimationProvider,
public platform: Platform) {
}
ionViewDidLoad() {
this.platform.ready().then(() => {
let self = this;
setTimeout(() => {
self.animation.animate(document.getElementById('animate_1'), 'animateLaunchIn');
self.animation.animate(document.getElementById('animate_2'), 'animateFadeInOut');
self.animation.animate(document.getElementById('animate_3'), 'animateClockwise');
self.animation.animate(document.getElementById('animate_4'), 'animateUpDown');
}, 100);
});
}
}
Upon commenting out the TranslateModule, the error is gone, but it breaks all my translation pipes.
welcome.module.ts
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { TranslateModule } from '@ngx-translate/core';
import { WelcomePage } from './welcome';
@NgModule({
declarations: [
WelcomePage,
],
imports: [
IonicPageModule.forChild(WelcomePage),
TranslateModule.forChild(WelcomePage)
],
exports: [
WelcomePage
]
})
export class WelcomePageModule { }
Thanks.