Cannot Resolve All Parameters for MyApp


#1

Sorry if this seems like a duplicate to the other questions since they didn’t help solve my issue. Can someone help me with this?

Can't resolve all parameters for MyApp: (?, ?, ?, ?, ?, ?).

app.component.ts

    import { Component } from '@angular/core';
    import { Platform } from 'ionic-angular';
    import { StatusBar } from '@ionic-native/status-bar';
    import { SplashScreen } from '@ionic-native/splash-screen';
    import { Subscription } from 'rxjs';
    
    import { GlobalService } from '../services/global-service';
    
    import { TabsPage } from '../pages/tabs/tabs';
    
    import { File } from '@ionic-native/file';
    import { Insomnia } from '@ionic-native/insomnia';
    
    @Component({
      templateUrl: 'app.html'
    })
    export class MyApp{
    
      constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, private global : GlobalService,
                  private file: File, private insomnia: Insomnia){}
    }

app.module.ts

    import { MyApp } from './app.component';
    import { GlobalService } from '../services/global-service';
    import { UserService } from '../services/user-service';
    
    import { StatusBar } from '@ionic-native/status-bar';
    import { SplashScreen } from '@ionic-native/splash-screen';
    import { File } from '@ionic-native/file';
    import { FileTransfer } from '@ionic-native/file-transfer';
    import { Insomnia } from '@ionic-native/insomnia';
    import { Network } from '@ionic-native/network';
    import { MusicControls } from '@ionic-native/music-controls';
    
    
    @NgModule({
      declarations: [
        MyApp,
        ...
      ],
      imports: [
        ...
      ],
      bootstrap: [...],
      entryComponents: [
        MyApp
      ],
      providers: [
        StatusBar,
        SplashScreen,
        Insomnia,
        File,
        FileTransfer,
        Network,
        MusicControls,
        {provide: ErrorHandler, useClass: IonicErrorHandler},
        GlobalService,
        UserService,
        { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig }
      ]
    })

export class AppModule {}

Can’t seem to find the root cause at all for my error. I’m using Ionic 3.9.2, Angular Core 5.2.9, Node 6.10.2