I am attempting to login using cordova plugins with Google Plus and Facebook. Both of these npm packages are giving me the issue:
core.js:1598 ERROR Error: Uncaught (in promise): TypeError: Object(...) is not a function TypeError: Object(...) is not a function at index.js:245 at Object../node_modules/@ionic-native/facebook/index.js (index.js:313) at webpack_require (bootstrap:81) at Object../src/app/services/auth.service.ts (chunk-fe7f197d.js:144) at webpack_require (bootstrap:81) at Object../src/app/pages/login/login.page.ts (pages-login-login-module.js:115) at webpack_require (bootstrap:81) at Object../src/app/pages/login/login.module.ts (pages-login-login-module.js:21) at webpack_require (bootstrap:81) at $_lazy_route_resource lazy namespace object:37 at index.js:245 at Object../node_modules/@ionic-native/facebook/index.js (index.js:313) at webpack_require (bootstrap:81) at Object../src/app/services/auth.service.ts (chunk-fe7f197d.js:144) at webpack_require (bootstrap:81) at Object../src/app/pages/login/login.page.ts (pages-login-login-module.js:115) at webpack_require (bootstrap:81) at Object../src/app/pages/login/login.module.ts (pages-login-login-module.js:21) at webpack_require (bootstrap:81) at $_lazy_route_resource lazy namespace object:37 at resolvePromise (zone.js:814) at resolvePromise (zone.js:771) at zone.js:873 at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421) at Object.onInvokeTask (core.js:4053) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420) at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
My Info is:
@ionic/cli-utils : 2.0.0-rc.6 ionic (Ionic CLI) : 4.0.0-rc.6
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@angular-devkit/core : 0.6.0 @angular-devkit/schematics : 0.6.0 @angular/cli : 6.0.1 @ionic/schematics-angular : 1.0.0-rc.6 Cordova Platforms : none Ionic Framework : @ionic/angular 4.0.0-alpha.7
System:
Android SDK Tools : 26.1.1 NodeJS : v8.9.4 npm : 6.1.0 OS : Windows 10
Environment Variables:
ANDROID_HOME : D:\SumTech Solutions\Software\Android_SDK
This becomes an issue only when i add the Imports to the constructor in my auth.service.
@ionic-native/facebookversion have you installed? Make sure to use the latest v5 beta. However, I'm having the same issue with a custom written plugin. - timbru31