I decided to update my Ionic 3.8.0 app which was using Angular 4.1.3 to Ionic 3.9.2 which is using Angular 5. What could be causing this error? If I need to provide more info please let me know
The error
TypeError: Illegal constructor
at _createClass (http://localhost:8101/build/vendor.js:10974:20)
at _createProviderInstance$1 (http://localhost:8101/build/vendor.js:10950:26)
at resolveNgModuleDep (http://localhost:8101/build/vendor.js:10935:17)
at _callFactory (http://localhost:8101/build/vendor.js:11001:28)
at _createProviderInstance$1 (http://localhost:8101/build/vendor.js:10953:26)
at resolveNgModuleDep (http://localhost:8101/build/vendor.js:10935:17)
at _callFactory (http://localhost:8101/build/vendor.js:11005:67)
at _createProviderInstance$1 (http://localhost:8101/build/vendor.js:10953:26)
at resolveNgModuleDep (http://localhost:8101/build/vendor.js:10935:17)
at _callFactory (http://localhost:8101/build/vendor.js:11003:67)
app.component.ts
export class MyApp
{
rootPage: any;
constructor(platform: Platform,
statusBar: StatusBar,
splashScreen: SplashScreen,
config: Config,
keyboard: Keyboard,
private storage: Storage,
private authService: AuthServiceProvider, // This is causing the error
device: Device,
alerts: AlertServiceProvider
)
{
}
authServiceProvider.service.ts
constructor(
private http: HttpClient,
private storage: Storage,
private constants: GlobalConstants,
private jwtHelper: JwtHelperService
)
package.json
{
"name": "app",
"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": "5.0.3",
"@angular/compiler": "5.0.3",
"@angular/compiler-cli": "5.0.3",
"@angular/core": "5.0.3",
"@angular/forms": "5.0.3",
"@angular/http": "5.0.3",
"@angular/platform-browser": "5.0.3",
"@angular/platform-browser-dynamic": "5.0.3",
"@auth0/angular-jwt": "^1.0.0-beta.9",
"@ionic-native/admob-free": "^4.5.3",
"@ionic-native/camera": "^4.5.3",
"@ionic-native/core": "4.4.0",
"@ionic-native/device": "^4.5.3",
"@ionic-native/file": "^4.5.3",
"@ionic-native/keyboard": "^4.5.3",
"@ionic-native/splash-screen": "4.4.0",
"@ionic-native/status-bar": "4.4.0",
"@ionic/pro": "1.0.20",
"@ionic/storage": "^2.1.3",
"angular2-moment": "^1.8.0",
"cordova-admob-sdk": "^0.15.0",
"cordova-android": "^6.3.0",
"cordova-plugin-admob-free": "^0.14.0",
"cordova-plugin-camera": "^4.0.2",
"cordova-plugin-device": "^2.0.1",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^1.1.16",
"cordova-plugin-keyboard": "^1.2.0",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-promise-polyfill": "0.0.2",
"cordova-sqlite-storage": "^2.2.1",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"rxjs": "^5.5.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "3.1.8",
"typescript": "2.4.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-camera": {},
"cordova-plugin-device": {},
"cordova-plugin-file": {},
"cordova-plugin-keyboard": {},
"cordova-sqlite-storage": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-admob-free": {}
},
"platforms": [
"android"
]
}
}