Hi,
I’m trying to make use of the Ionic Native Badge plugin with cordova by using capacitor.
However in the documentation it shows me to install @ionic-native/badge@4 and cordova-plugin-badge.
Both which I’ve installed. Whenever I try to use the badge functionality I’m getting the error:
Object(WEBPACK_IMPORTED_MODULE_1__ionic_native_core[“cordova”]) is not a function.
I’m not sure whether this is because I haven’t done a haspermission check yet, or whether this is due to a conflict with ionic-native.
I found a github issue from someone saying I should update the ionic-native version since it is conflicting with other ionic-native functionality?
So I figured I’d do:
npm install @ionic-native/badge@latest
and
npm install cordova-plugin-badge@latest
which then tells me the following error during compilation:
error TS2749: ‘Badge’ refers to a value, but is being used as a type here.
for private badge: Badge,
where Badge is imported from @ionic-native/badge
any idea what I am doing wrong here?
Please help I’m stuck.
My information:
Ionic:
Ionic CLI : 6.7.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 4.11.10
@angular-devkit/build-angular : 0.803.24
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.2.0
Capacitor:
Capacitor CLI : 1.5.2
@capacitor/core : 2.1.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : not available
Cordova Plugins : not available
Utility:
cordova-res (update available: 0.15.0) : 0.14.0
native-run (update available: 1.0.0) : 0.2.8
System:
Android SDK Tools : 25.2.4 (/users/doelapp/Library/Android/sdk/)
ios-deploy : 1.9.4
NodeJS : v12.1.0 (/usr/local/Cellar/node/12.1.0/bin/node)
npm : 6.13.7
OS : macOS Catalina
Xcode : Xcode 11.5 Build version 11E608c