In ionic 2 Framework, If you are facing the problem like no provider Device, Camera, Contacts, File, Bluetooth, Google Maps, Google Plus, Push Notification etc. Then you are in the right place. This tutorial will explain, why the no provider is occurring and how to solve this.

Recently(March 21, 2017 ), the Ionic team updated the native plugin version from 2.x to 3.x. The purpose of the update is, 

1. 100% browser development support for native plugins. You can execute the most of the native plugins using your browser.

2. Improved application code bundling size.

Due to the Ionic native plugin 3.x update, the no provider error is occurring. To solve this problem, you must install ionic-core and include the required plugin to the ngModule provider.

Installation

Say, for example, if you want to use the camera plugin or any other plugin, you must install ionic-native before installing other plugins. To install ionic-native, go the root of your project and execute the below command

npm install @ionic-native/core --save


Then install camera plugin using

npm install @ionic-native/camera --save

or

ionic plugin add cordova-plugin-camera

Add Plugins to Your App's Module

After installing the camera plugin, you must add the plugin to the App's ngModule using the app.component.ts file. 

Open app.module.ts file and add camera plugin using

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

Then add the camera to the provider

providers: [
...
Camera
...
]

Ionic/Angular 1 Support

Ionic native plugin 3.x won't support Ionic/AngularJS 1. So if you are using Ionic Framework version 1, then don't use the version 3.x CLI(command line interface)