Ionic module.app problems

#1

Okay tengo aqui los imports de mi module.app
Sin embargo en el provider miren lo que ocurre si descomento alguno de los plugin que tengo comentados

Le quito el comentario, por ejemplo, el plugin filepath…

Todo el ngModel me da error.

El problema es que esto me funcionaba en una versión anterior a mi proyecto pero ahora si intento instalar cualquiera de los plugin que están comentados al principio en cualquier versión del proyecto ya no funciona y me sale ese error de tipos no coincidentes.

He actualizado ionic, cordova, plugins, reinstalado los plugin, he mirado en mil sitios y no hay nada que se parezca a esto. Alguien sabe que puede ser. Si necesitan algo mas diganmelo.

Como información adicional el proyecto empezó en ionic 3 y he ido actualizando sin problemas todas las versiones.

#2

Podrías pegar tu app.module.ts?

#3

while installing npm install @ionic-native/plugin name @ [oldversion of plugin(in ionic 3)]

like
npm install @ionic-native/file-chooser@4.17.0

#4

import { BrowserModule } from ‘@angular/platform-browser’;
import { ErrorHandler, NgModule } from ‘@angular/core’;
import { IonicApp, IonicErrorHandler, IonicModule, Select } from ‘ionic-angular’;
import { SplashScreen } from ‘@ionic-native/splash-screen’;
import { StatusBar } from ‘@ionic-native/status-bar’;
import { SQLite } from ‘@ionic-native/sqlite’;
import { HttpModule } from ‘@angular/http’;
import { File } from ‘@ionic-native/file’;
import { FilePath } from ‘@ionic-native/file-path’;
import { FileChooser } from ‘@ionic-native/file-chooser’;
import { IOSFilePicker } from ‘@ionic-native/file-picker’;
import { FileOpener } from ‘@ionic-native/file-opener’;
import { Device } from ‘@ionic-native/device’;
import { BarcodeScanner } from ‘@ionic-native/barcode-scanner’;
import { BluetoothSerial } from ‘@ionic-native/bluetooth-serial’;
import { BLE } from ‘@ionic-native/ble’;
import { AnimationService, AnimationBuilder } from ‘css-animator’;
import { SignaturePadModule } from ‘angular2-signaturepad’;
import { Geolocation } from ‘@ionic-native/geolocation’;
import { LaunchNavigator } from ‘@ionic-native/launch-navigator’;
import { Base64 } from ‘@ionic-native/base64’;

import { MyApp } from ‘./app.component’;
import { FirmarPage } from ‘…/pages/firmar/firmar’;

import { BaseDatos } from ‘…/providers/basedatos’;
import { FuncionesGlob } from ‘…/providers/funciones’;
import { Babel } from ‘…/providers/babel’;
import { OpcionesAvanzadas } from ‘…/providers/opciones-avanzadas’;
import { Sincronizacion } from ‘…/providers/sincronizacion’;

@NgModule({
declarations: [
MyApp,
FirmarPage
],
imports: [
BrowserModule,
HttpModule,
SignaturePadModule,
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
FirmarPage
],
providers: [
AnimationService,
AnimationBuilder,
StatusBar,
SplashScreen,
SQLite,
File,
FilePath, // hace que me de error al compilar
FileChooser, // hace que me de error al compilar
IOSFilePicker, // hace que me de error al compilar
FileOpener, // hace que me de error al compilar
Device,
BarcodeScanner,
{provide: ErrorHandler, useClass: IonicErrorHandler},
BaseDatos,
FuncionesGlob,
Babel,
OpcionesAvanzadas,
Sincronizacion,
Select,
BluetoothSerial,
BLE,
Geolocation, // hace que me de error al compilar
LaunchNavigator, // hace que me de error al compilar
Base64 // hace que me de error al compilar
]
})
export class AppModule {}

#5

I tried with older versions of plugins and I tried npm install @ionic-native/file-chooser@4.17.0 too. It didn’t work yet.

#6

I was facing the same issue , because of update of ionic 4 compatiable plugin in @ionic-native github repo. You need to install older version using : npm install --save @ionic-native/plugin_of_your_choice@4.20.0

Remember - dont play with the number after @ , go to the repo and check for versions, and install accordingly. I

I was facing the same issue, and it stopped after i followed the above mentioned solution. You ca n also see this : https://stackoverflow.com/questions/54361396/ionic-3-error-install-native-plugin-after-ionic-4-release

3 Likes
#7

I saw you link, its really helpful. Thanks you very much.

I used /ngx at the end of the imports and it’s works :D. I even haven’t had to use old plugin version.

If someone else have this inssue check this link, that help to me: https://stackoverflow.com/questions/54361396/ionic-3-error-install-native-plugin-after-ionic-4-release