Hello everybody,
after installing google maps on my project I can’t start my app on localhost. I always get the message:
Object(ionic_native_core__WEBPACK_IMPORTED_MODULE_1_[“Cordova”]) is not a function. (In ‘Object(ionic_native_core__WEBPACK_IMPORTED_MODULE_1_[“Cordova”])({ sync: true })’, ‘Object(ionic_native_core__WEBPACK_IMPORTED_MODULE_1_[“Cordova”])’ is an instance of Object)
As package,json I have this code:
{
“name”: “test”,
“version”: “0.0.1”,
“author”: “Ionic Framework”,
“homepage”: “http://ionicframework.com/”,
“private”: true,
“scripts”: {
“start”: “ionic-app-scripts serve”,
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“lint”: “ionic-app-scripts lint”
},
“dependencies”: {
“@angular/animations”: “5.2.11”,
“@angular/common”: “5.2.11”,
“@angular/compiler”: “5.2.11”,
“@angular/compiler-cli”: “5.2.11”,
“@angular/core”: “5.2.11”,
“@angular/forms”: “5.2.11”,
“@angular/http”: “5.2.11”,
“@angular/platform-browser”: “5.2.11”,
“@angular/platform-browser-dynamic”: “5.2.11”,
“@ionic-native/app-version”: “^4.8.0”,
“@ionic-native/camera”: “^5.0.0”,
“@ionic-native/core”: “^5.0.0”,
“@ionic-native/google-maps”: “^4.20.0”,
“@ionic-native/image-picker”: “^5.0.0”,
“@ionic-native/splash-screen”: “~4.10.0”,
“@ionic-native/status-bar”: “~4.10.0”,
“@ionic/storage”: “2.1.3”,
“cordova-android”: “^7.1.4”,
“cordova-plugin-app-version”: “0.1.9”,
“cordova-plugin-camera”: “^4.0.3”,
“cordova-plugin-device”: “^2.0.2”,
“cordova-plugin-ionic-keyboard”: “^2.0.5”,
“cordova-plugin-ionic-webview”: “^1.2.1”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-telerik-imagepicker”: “2.2.3”,
“cordova-plugin-whitelist”: “^1.3.3”,
“ionic-angular”: “3.9.2”,
“ionicons”: “3.0.0”,
“rxjs”: “5.5.11”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “0.8.26”
},
“devDependencies”: {
“@ionic/app-scripts”: “3.1.11”,
“typescript”: “~2.6.2”
},
“description”: “An Ionic project”,
“cordova”: {
“plugins”: {
“cordova-plugin-whitelist”: {},
“cordova-plugin-device”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-ionic-webview”: {},
“cordova-plugin-ionic-keyboard”: {},
“cordova-plugin-camera”: {},
“cordova-plugin-telerik-imagepicker”: {},
“cordova-plugin-googlemaps”: {
“API_KEY_FOR_ANDROID”: “AIzaSyBw0gYj_T5vfy2HOBAod029_9XWCqf3iaE”,
“API_KEY_FOR_IOS”: “AIzaSyBw0gYj_T5vfy2HOBAod029_9XWCqf3iaE”,
“PLAY_SERVICES_VERSION”: “15.0.1”,
“ANDROID_SUPPORT_V4_VERSION”: “27.+”
},
“cordova-plugin-app-version”: {}
},
“platforms”: [
“android”
]
}
}
The file app.module.ts includes these information:
import { NgModule, ErrorHandler } from ‘@angular/core’;
import { BrowserModule } from ‘@angular/platform-browser’;
import { IonicApp, IonicModule, IonicErrorHandler } from ‘ionic-angular’;
import { MyApp } from ‘./app.component’;
…
import { GoogleMap, GoogleMaps} from ‘@ionic-native/google-maps’;
@NgModule({
declarations: [
MyApp,
…
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
…
],
providers: [
StatusBar,
SplashScreen,
GoogleMap,
GoogleMaps,
{provide: ErrorHandler, useClass: IonicErrorHandler}
]
})
export class AppModule {}
Other information:
onic:
ionic (Ionic CLI) : 4.9.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.11
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : none
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 6 other plugins)
System:
NodeJS : v11.2.0 (/usr/local/Cellar/node/11.2.0/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61
Are the versions of my packages compatible? Thanks for help!