Problem import AutoStart(IONIC 4)

Error import,

index.js:72 Uncaught TypeError: Object(…) is not a function
at index.js:72
at Module…/node_modules/@ionic-native/autostart/index.js (index.js:114)
at webpack_require (bootstrap:84)
at Module…/src/app/app.component.ts (main.js:842)
at webpack_require (bootstrap:84)
at Module…/src/app/app.module.ts (app.component.ts:14)
at webpack_require (bootstrap:84)
at Module…/src/main.ts (main.ts:1)
at webpack_require (bootstrap:84)
at Object.0 (alert.service.ts:7)

App component .ts

import {Component} from ‘@angular/core’;
import {Platform, NavController, MenuController} from ‘@ionic/angular’;
import {SplashScreen} from ‘@ionic-native/splash-screen/ngx’;
import {StatusBar} from ‘@ionic-native/status-bar/ngx’;
import {AuthenticationService} from ‘./services/authentication.service’;
import {Router} from ‘@angular/router’;
import { Autostart } from ‘@ionic-native/autostart’; - PS(Error and ngx autostart);

@Component({
selector: ‘app-root’,
templateUrl: ‘app.component.html’,
styleUrls: [‘app.component.scss’]
})
export class AppComponent {
constructor(
private platform: Platform,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
private authService: AuthenticationService,
private router: Router,
private navController: NavController,
public menuCtrl: MenuController,
private autostart: Autostart
) {
this.initializeApp();
}

/**
 * @method Check if the user ios authenticated, if yes will be redirected to homeShooter page, if not homePage
 */
initializeApp() {
    this.platform.ready().then(() => {
        this.statusBar.styleDefault();
        this.splashScreen.hide();
        this.authService.authenticationState.subscribe(state => {
            if (state) {
                this.navController.navigateRoot(['home/shooter']);
            } else {
                this.navController.navigateRoot(['home']);
            }
        });
    });
}

/**
 * @method Redirect to event Page
 */
goToEvent() {
    this.menuCtrl.enable(false, 'first');
    this.router.navigate(['/event/list']);
    this.menuCtrl.enable(true, 'first');
}

/**
 * @method Redirect to habituality Page
 */
gotToHabituality() {
    this.menuCtrl.enable(false, 'first');
    this.router.navigate(['/habituality']);
    this.menuCtrl.enable(true, 'first');
}

/**
 * @method Redirect to home Page
 */
logout() {
    this.menuCtrl.enable(false, 'first');
    this.authService.logout();
    this.menuCtrl.enable(true, 'first');
}

/**
 * @method Redirect to chat Page
 */
goToChat() {
    this.menuCtrl.enable(false, 'first');
    this.router.navigate(['/home/chat']);
    this.menuCtrl.enable(true, 'first');
}

/**
 * @method Redirect to noticie Page
 */

goToNoticie() {
    this.menuCtrl.enable(false, 'first');
    this.router.navigate(['noticies']);
    this.menuCtrl.enable(true, 'first');
}

}

The problem is likely that you have a mishmash of @ionic-native/* things in your package.json. They must all share the same major version. Search the forums with your error message to find many other similar topics.