我是Ionic的新手,我正在为Android和ios开发带有Push Notifications的应用程序,但是当我安装了必需的插件时,我得到了一个错误。
请检查以下已安装的插件,并请检查显示我的错误的图像。
vendor.js:1824 ERROR TypeError: Object(...) is not a function
at PushObject.on (vendor.js:143547)
at MyApp.webpackJsonp.503.MyApp.initPushNotification (main.js:4995)
我已经安装了以下插件,请检查以下 package.json 文件
"dependencies": {
"@angular/animations": "5.2.10",
"@angular/common": "5.2.10",
"@angular/compiler": "5.2.10",
"@angular/compiler-cli": "5.2.10",
"@angular/core": "5.2.10",
"@angular/forms": "5.2.10",
"@angular/http": "5.2.10",
"@angular/platform-browser": "5.2.10",
"@angular/platform-browser-dynamic": "5.2.10",
"@ionic-native/core": "^4.7.0",
"@ionic-native/facebook": "^5.2.0",
"@ionic-native/geolocation": "^5.2.0",
"@ionic-native/native-storage": "^5.2.0",
"@ionic-native/network": "^5.2.0",
"@ionic-native/push": "5.2.0",
"@ionic-native/splash-screen": "4.7.0",
"@ionic-native/status-bar": "4.7.0",
"@ionic/storage": "2.1.3",
"@types/google-maps": "^3.2.0",
"cordova-android": "7.1.4",
"cordova-browser": "^5.0.3",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-facebook4": "4.2.1",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-nativestorage": "2.3.2",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-support-google-services": "1.1.0",
"font-awesome": "4.7.0",
"ionic-angular": "3.9.2",
"ionic-img-viewer": "^2.9.0",
"ionicons": "^3.0.0",
"ng-recaptcha": "^3.0.5",
"phonegap-plugin-push": "2.2.3",
"rxjs": "^6.0.0",
"rxjs-compat": "^6.4.0",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@ionic/app-scripts": "3.2.0",
"@ionic/cli-plugin-cordova": "1.6.2",
"@ionic/cli-plugin-ionic-angular": "1.4.1",
"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-facebook4": {
"APP_ID": "2023189344386966",
"APP_NAME": "CBL",
"FACEBOOK_ANDROID_SDK_VERSION": "4.40.0",
"FACEBOOK_HYBRID_APP_EVENTS": "false"
},
"cordova-plugin-nativestorage": {},
"phonegap-plugin-push": {
"SENDER_ID": "11017500524",
"ANDROID_SUPPORT_V13_VERSION": "27.+",
"FCM_VERSION": "11.6.2"
},
"cordova-plugin-statusbar": {}
},
"platforms": \[
"browser",
"android"\
]
},