camera in provider

#1

hello i’m new here and ionic framework.
i declared the ‘camera’ but there put this error.
Can anyone know how to solve this problem.

Type ‘CameraOriginal’ is not assignable to type ‘Provider’.
Type ‘CameraOriginal’ is missing the following properties from type ‘FactoryProvider’: provide, useFactory

#2

Hi, @SRoslan
Can you please tell me where you have declared camera that will give error or can you please share your code here so, that I can figure out what exactly the problem is.

#3

here my code. I already added ‘ngx’. but when running the code. It show new error again. and i don’t know how to fix it.
app.module.ts


import { NgModule, ErrorHandler } from '@angular/core';

import { BrowserModule } from '@angular/platform-browser';

import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';

import { Camera } from '@ionic-native/camera/ngx';
import { IonicStorageModule } from'@ionic/storage';
import firebaseConfig from './firebase'
import { AngularFireModule } from '@angular/fire';
import { AngularFireAuthModule } from '@angular/fire/auth'
import { ProvidersAuthProvider } from '../providers/providers-auth/providers-auth';
import { LocationsProvider } from '../providers/locations/locations';
import { ListPage } from '../pages/list/list';
import { Geolocation } from '@ionic-native/geolocation';
import { HawkerProvider } from '../providers/hawker/hawker';
 providers: [
    StatusBar,
    SplashScreen, 
    Camera,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    Geolocation,
    ProvidersAuthProvider,
    LocationsProvider,
    HawkerProvider
  ]