I get a problem using native plugin ionic 3 when install Native Store is success, but when I try to add in app module, the text editor show a red line and when I try to run
For those that end here running on Ionic 5 just fix your import statement from:
import { BarcodeScanner } from ‘@ionic-native/barcode-scanner’;
to:
import { BarcodeScanner } from ‘@ionic-native/barcode-scanner/ngx’;
Otherwise the above work for Ionic 3.9x and Ionic 4.xx
Try To Find .. Second Last Previous Version of Plugin & Append While Adding Plugin
npm install @ionic-native/native-storage@4.19.0
Here... Latest Version is 5.0.0 So Add @4.19.0 Please Don't Make Assumption Based On
Number Go In Repo or npm link try to find our previous version then append.
Then do your All Step Regularly.
Thanks
Goto https://www.npmjs.com.
Search for the ionic-native package that you want to install.
In your case, its 'ionic-native-storage'. Check the versions and choose the one which was released before the Ionic 4 Beta release and then install the appropriate version using the same command.
ionic cordova plugin add cordova-plugin-nativestorage@"====add your version here===="
After that the plugin will work the same way as it did. No need to fiddle with adding 'ngx' at the end of the path.
All your @ionic-native modules now need /ngx at the end for Angular projects. Just fix it like this:
import { NativeStorage } from '@ionic-native/native-storage/ngx';
Apply this to every @ionic-native plugin/module.