Ionic 3 error install native plugin after Ionic 4 release - ionic-framework

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 I found an error like below. Here I install Native-store (https://ionicframework.com/docs/v3/native/native-storage/)
Red line in text editor, successful install but when add in app module show red line.
This is error in console when run 'ionic cordova run android'.
[14:40:05] ionic-app-scripts 3.1.8
[14:40:05] build dev started ...
[14:40:05] clean started ...
[14:40:05] clean finished in 71 ms
[14:40:05] copy started ...
[14:40:07] deeplinks started ...
[14:40:08] deeplinks finished in 1.04 s
[14:40:08] transpile started ...
[14:40:27] typescript: D:/myProject/ionic/myApp/src/app/app.module.ts, line: 57
Argument of type '{ declarations: (typeof VerificationPage | typeof LoginPage | typeof PrivacyRegisterPage |
typeof...' is not assignable to parameter of type 'NgModule'. Types of property 'providers' are
incompatible. Type '(typeof SplashScreen | typeof FCM | typeof InAppBrowser | typeof AppVersion | typeof
Market | typ...' is not assignable to type 'Provider[]'. Type 'typeof SplashScreen | typeof FCM | typeof
InAppBrowser | typeof AppVersion | typeof Market | type...' is not assignable to type 'Provider'. Type
'NativeStorageOriginal' is not assignable to type 'Provider'. Type 'NativeStorageOriginal' is not assignable
to type 'ClassProvider'. Property 'provide' is missing in type 'NativeStorageOriginal'.
[14:40:27] ionic-app-script task: "build"
[14:40:27] Error: Failed to transpile program
Error: Failed to transpile program
at new BuildError (D:\myProject\ionic\myApp\node_modules\#ionic\app-scripts\dist\util\errors.js:16:28)
at D:\myProject\ionic\myApp\node_modules\#ionic\app-scripts\dist\transpile.js:159:20
at Promise (<anonymous>)
at transpileWorker (D:\myProject\ionic\myApp\node_modules\#ionic\app-scripts\dist\transpile.js:107:12)
at Object.transpile (D:\myProject\ionic\myApp\node_modules\#ionic\app-scripts\dist\transpile.js:64:12)
at D:\myProject\ionic\myApp\node_modules\#ionic\app-scripts\dist\build.js:109:82
at <anonymous>
[ERROR] Command not found: ionic-app-scripts
Please help me to solve this problem.
Thanks.

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.

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.

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

Related

Ionic native -When installing CallLog plugin and try to initialise the getCallLog() compilation fails

This is the error shown in terminal
./node_modules/#ionic-native/call-log/__ivy_ngcc__/index.js:94:8-15 - Error: export 'Cordova' (imported as 'Cordova') was not found in '#ionic-native/core' (possible exports: IonicNativePlugin, checkAvailability, cordova, cordovaFunctionOverride, cordovaInstance, cordovaPropertyGet, cordovaPropertySet, getPromise, instanceAvailability, instancePropertyGet, instancePropertySet, wrap)
I tried reinstalling the package as well as native/core

Upgrade to cordova-android 11: Plugin cordova-plugin-video-editor will not work anymore

I just updating my ionic project to Cordova Android 11 (because of android-targetSdkVersion which must be > 30 this fall).
Seems that good old plugin cordova-plugin-video-editor will not work anymore when building the project:
import net.ypresto.androidtranscoder.MediaTranscoder;
^
/Users/olivierschmid/AppDev/b2c-customer-app/platforms/android/app/src/main/java/org/apache/cordova/videoeditor/CustomAndroidFormatStrategy.java:6: error: package net.ypresto.androidtranscoder.format does not exist
import net.ypresto.androidtranscoder.format.MediaFormatStrategy;
^
/Users/olivierschmid/AppDev/b2c-customer-app/platforms/android/app/src/main/java/org/apache/cordova/videoeditor/CustomAndroidFormatStrategy.java:7: error: package net.ypresto.androidtranscoder.format does not exist
import net.ypresto.androidtranscoder.format.OutputFormatUnavailableException;
^
/Users/olivierschmid/AppDev/b2c-customer-app/platforms/android/app/src/main/java/org/apache/cordova/videoeditor/CustomAndroidFormatStrategy.java:14: error: cannot find symbol
public class CustomAndroidFormatStrategy implements MediaFormatStrategy {
Does someone have a tipp what alternative I can try (for compressing videos)? There seem not to be many options?
Thanks! Oli
Have you already tried adding "cordova-plugin-androidx-adapter"?

myfatoorah_flutter import package fails build

I have added myfatoorah_flutter package version 1.0.7 and in file I have imported the package as import 'package:myfatoorah_flutter/myfatoorah_flutter.dart'; it fails the build and gives the following error
../../../Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/myfatoorah_flutter-1.0.7/lib/myfatoorah_flutter.dart:609:31: Error: The argument type 'bool Function(bool)' can't be assigned to the parameter type 'bool Function(bool, RouteInfo)'.
- 'RouteInfo' is from 'package:back_button_interceptor/src/back_button_interceptor.dart'
('../../../Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/back_button_interceptor-4.3.1/lib/src/back_button_interceptor.dart').
BackButtonInterceptor.add(myInterceptor);
I have tried following solutions and none of them worked:
changed version of myfatoorah_flutter
switched between channels dev/stable
upgraded flutter sdk
settings.gradle removed and added again
when I remove import line, it works fine, help is required so that I can integrate the payment methods
I am also getting the same error as I tried this way and worked for me.
change version of back_button_interceptor to back_button_interceptor: 4.0.2 in myfatoorah_flutter's pubspec.ymal.

Getting error while adding plugin in app.module.ts

Whenever I am trying to add PhotoLibrary plugin in ionic, I am not able to add it in app.module.ts . I am getting the following error
Type 'PhotoLibraryOriginal' is not assignable to type 'Provider'.
Type 'PhotoLibraryOriginal' is missing the following properties from type 'FactoryProvider': provide, useFactory [2322]
(alias) const PhotoLibrary: PhotoLibraryOriginal
import PhotoLibrary
Please check the below image for full error.
import from /ngx for all latest ionic native plugins used with ionic-angular apps...
import { PhotoLibrary } from '#ionic-native/photo-library/ngx';
Else fallback to version 4.* of plugins

Error installing purescript-list

I'm new to Purescript and am following the tutorial for installation. Purescript itself is working and I can start the CLI using pulp psci, but installing purescript-list runs into trouble.
Having entered the command bower install purescript-lists --save, I get a long list of package names, but when it gets to purescript-eff and purescript-prelude I run into some version conflicts:
bower purescript-eff#^2.0.0 cached https://github.com/purescript/purescript-eff.git#2.0.0
bower purescript-eff#^2.0.0 validate 2.0.0 against https://github.com/purescript/purescript-eff.git#^2.0.0
Unable to find a suitable version for purescript-eff, please choose one by typing one of the numbers below:
1) purescript-eff#^1.0.0 which resolved to 1.0.0 and is required by purescript-console#1.0.0
2) purescript-eff#^2.0.0 which resolved to 2.0.0 and is required by purescript-st#2.0.0
Prefix the choice with ! to persist it to bower.json
? Answer
A similar message is shown for purescript-prelude. No matter which options I choose, both pulp build and pulp run fail with:
$ pulp build
* Building project in /Developer/purescript/training1
Error found:
in module PSCI.Support
at /Developer/purescript/training1/bower_components/purescript-psci-support/src/PSCI/Support.purs line 10, column 34 - line 10, column 53
Cannot import value unsafeInterleaveEff from module Control.Monad.Eff.Unsafe
It either does not exist or the module does not export it.
See https://github.com/purescript/purescript/wiki/Error-Code-UnknownImport for more information,
or to contribute content related to this error.
Compiling PSCI.Support
* ERROR: Subcommand terminated with exit code 1
What have I missed here?
Thanks
Chris W
If you are using psc version 0.10.* you should go with prelude, lists and eff v2*.
If you are using psc version 0.9.* you should go with prelude, lists and eff v1*.
If you are using psc 0.10.* you might want to update pulp to version 9.1.0
The problem occurs due to breaking changes between psc 0.9 and 0.10 and the relevant libraries. by writing bower install purescript-lists --save you are asking bower for the latest dependencies which conflict with the dependency versions specified in your bower.json.