-2

I am using ionic platform with Angular.

Seeing this error in npm install:

C:/Users/Lenovo/node_modules/@ionic-native/camera/ngx/index.js
Module not found: Error: Can't resolve '@angular/core' in 'C:\Users\Lenovo\node_modules\@ionic-native\camera\ngx'

Below is my AppModule import list:

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';

import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';

import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';

import { Camera } from '@ionic-native/camera/ngx';
import { NgProgressModule } from 'ngx-progressbar';

Please let me know what i am missing here. Thanks

P Varga
  • 19,174
  • 12
  • 70
  • 108

1 Answers1

0

Seams something is wrong with your plugins. Try to add your camera plugin again. Within the Terminal, change to directory of your project and execute this two commands:

ionic cordova plugin add cordova-plugin-camera
npm install @ionic-native/camera

Also make sure to add your injectable service to a provider.

Felix Quehl
  • 744
  • 1
  • 9
  • 24