Hello everyone,
I Have a question about the implementation of in App Purchase plugin.
when i want to put import { InAppPurchase } from '@ionic-native/in-app-purchase';
in my providers list i got this:
{
...
"owner": "typescript",
"code": "2322",
"severity": 8,
"message": "Impossible to assignate **le type 'InAppPurchaseOriginal' au type 'Provider'**.\n Type 'InAppPurchaseOriginal' is missing the following properties from type 'FactoryProvider': provide, useFactory",
...
}
so i use import { InAppPurchase } from '@ionic-native/in-app-purchase/ngx';
got the same issue about the InAppPurchaseOriginal before the build.
"message": "Can not assign type 'InAppPurchaseOriginal' to type 'Provider'.\n Type 'InAppPurchaseOriginal' is missing the following properties from type 'FactoryProvider': provide, useFactory",
so maybe is it a problem with my npm ?
got this
npm i @ionic-native/in-app-purchase@4 --save
npm WARN @ionic-native/apple-pay@4.20.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/date-picker@4.13.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/in-app-purchase-2@5.0.0 requires a peer of @ionic-native/core@5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/keyboard@4.19.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/market@4.19.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/native-audio@4.17.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/network@4.19.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/onesignal@4.18.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/wheel-selector@4.17.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-jwt@0.2.3 requires a peer of @angular/core@^2.0.0||^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-jwt@0.2.3 requires a peer of @angular/http@^2.0.0||^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.10 requires a peer of @angular/common@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.10 requires a peer of @angular/core@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.10 requires a peer of @angular/platform-browser@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.10 requires a peer of @angular/platform-browser-dynamic@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.10 requires a peer of rxjs@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/in-app-purchase@4.20.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
+ @ionic-native/in-app-purchase@4.20.0
I had this warnings for a long time but didn’t stop the app’s build and run.
i thought about a “rights” problems, i need to sudo when i want to update ionic.
Plugin "cordova-plugin-inapppurchase" already installed on android.
Plugin "cordova-plugin-inapppurchase" already installed on browser.
Plugin "cordova-plugin-inapppurchase" already installed on ios.
Adding cordova-plugin-inapppurchase to package.json
Saved plugin info for "cordova-plugin-inapppurchase" to config.xml
I told you to remove the plugin you installed initially and after then go to node_modules ==> @ionic-native then delete the folder of the plugin before you run the commands i gave you.