ionic-native issue

Created on 4 Aug 2018  路  2Comments  路  Source: ionic-team/ionic-native

ionic 4 application:-

I use ionic-native/camera in my application but got this issue:-

TypeError: Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_1__["Cordova"]) is not a function. (In 'Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_1__["Cordova"])

Most helpful comment

Make sure you are installing the beta version of ionic-native/camera as that will contain angular compatibility npm install --save @ionic-native/camera@beta. Also, make sure to add the plugin into your app.module.ts. I believe this is an issue with the docs not specifying what version to get.

import { Camera } from '@ionic-native/camera/ngx'; 

providers: [  Camera ]

All 2 comments

Make sure you are installing the beta version of ionic-native/camera as that will contain angular compatibility npm install --save @ionic-native/camera@beta. Also, make sure to add the plugin into your app.module.ts. I believe this is an issue with the docs not specifying what version to get.

import { Camera } from '@ionic-native/camera/ngx'; 

providers: [  Camera ]

tank your

Was this page helpful?
0 / 5 - 0 ratings