@zahidulislam wrote:
I have installed photo viewer native plugin with ionic 3. when i run (ionic serve) project. Its show me error(given bellow). But I already added provider to my app.module file. I don’t understand why this is happening, I already uninstall node, cordova, ionic, clean cache and reinstall everything nothing is working for me.
Environment Info:
cli packages: (C:\Users\App Dev Team\AppData\Roaming\npm\node_modules) @ionic/cli-utils : 1.19.1 ionic (Ionic CLI) : 3.19.1 global packages: cordova (Cordova CLI) : 8.0.0 local packages: @ionic/app-scripts : 3.0.0 Cordova Platforms : none Ionic Framework : ionic-angular 3.7.1 System: Node : v8.9.4 npm : 5.6.0 OS : Windows 10 Environment Variables: ANDROID_HOME : not set Misc: backend : pro
Error: Uncaught (in promise): Error: No provider for PhotoViewer! Error: No provider for PhotoViewer! at injectionError (http://localhost:8100/build/vendor.js:1526:90) at noProviderError (http://localhost:8100/build/vendor.js:1564:12) at ReflectiveInjector_._throwOrNull (http://localhost:8100/build/vendor.js:3006:19) at ReflectiveInjector_._getByKeyDefault (http://localhost:8100/build/vendor.js:3045:25) at ReflectiveInjector_._getByKey (http://localhost:8100/build/vendor.js:2977:25) at ReflectiveInjector_.get (http://localhost:8100/build/vendor.js:2846:21) at resolveNgModuleDep (http://localhost:8100/build/vendor.js:9846:25) at _createClass (http://localhost:8100/build/vendor.js:9897:32) at _createProviderInstance$1 (http://localhost:8100/build/vendor.js:9857:26) at resolveNgModuleDep (http://localhost:8100/build/vendor.js:9842:17) at c (http://localhost:8100/build/polyfills.js:3:19132) at Object.reject (http://localhost:8100/build/polyfills.js:3:18554) at NavControllerBase._fireError (http://localhost:8100/build/vendor.js:48071:16) at NavControllerBase._failed (http://localhost:8100/build/vendor.js:48059:14) at http://localhost:8100/build/vendor.js:48114:59 at t.invoke (http://localhost:8100/build/polyfills.js:3:14356) at Object.onInvoke (http://localhost:8100/build/vendor.js:4247:33) at t.invoke (http://localhost:8100/build/polyfills.js:3:14296) at r.run (http://localhost:8100/build/polyfills.js:3:9523) at http://localhost:8100/build/polyfills.js:3:19622
Here is my app.module.ts file code:
import { BrowserModule } from '@angular/platform-browser'; import { ErrorHandler, NgModule } from '@angular/core'; import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular'; import {HttpModule} from '@angular/http' import { IonicStorageModule } from '@ionic/storage'; import { MyApp } from './app.component'; import { StatusBar } from '@ionic-native/status-bar'; import { SplashScreen } from '@ionic-native/splash-screen'; import { ExtraServiceProvider } from '../providers/extra-service/extra-service'; import { PhotoViewer } from '@ionic-native/photo-viewer'; import { File } from '@ionic-native/file'; @NgModule({ declarations: [ MyApp ], imports: [ BrowserModule, IonicModule.forRoot(MyApp), IonicStorageModule.forRoot(), HttpModule ], bootstrap: [IonicApp], entryComponents: [ MyApp ], providers: [ StatusBar, SplashScreen, {provide: ErrorHandler, useClass: IonicErrorHandler}, ExtraServiceProvider, PhotoViewer, File ] }) export class AppModule {}
Posts: 1
Participants: 1