install the CameraPreview plugin, CameraPreview plugin is not installed

595 views Asked by At

I'm making an app using ionic and cordova. I add CameraPreview Plugin to use it, but when i deploy to ios and test on iphone, it says

[Warning] Native: tried calling CameraPreview.startCamera, but the CameraPreview plugin is not installed. (vendor.js, line 1)

[Warning] Install the CameraPreview plugin: 'ionic cordova plugin add cordova-plugin-camera-preview' (vendor.js, line 1)

but in my pakage.json camera preview presents

"dependencies": {
    "@angular/common": "4.1.3",
    "@angular/compiler": "4.1.3",
    "@angular/compiler-cli": "4.1.3",
    "@angular/core": "4.1.3",
    "@angular/forms": "4.1.3",
    "@angular/http": "4.1.3",
    "@angular/platform-browser": "4.1.3",
    "@angular/platform-browser-dynamic": "4.1.3",
    "@ionic-native/camera-preview": "^4.2.1",
    "@ionic-native/core": "3.12.1",
    "@ionic-native/splash-screen": "3.12.1",
    "@ionic-native/status-bar": "3.12.1",
    "@ionic/storage": "2.0.1",
    "cordova-android": "^6.2.3",
    "cordova-browser": "^4.1.0",
    "cordova-ios": "^4.4.0",
    "cordova-plugin-camera-preview": "git+https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview.git",
    "cordova-plugin-console": "^1.0.5",
    "cordova-plugin-device": "^1.1.4",
    "cordova-plugin-splashscreen": "^4.0.3",
    "cordova-plugin-statusbar": "^2.2.2",
    "cordova-plugin-whitelist": "^1.3.1",
    "ionic-angular": "3.5.3",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "3.0.0",
    "rxjs": "5.4.0",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.12"
},

first, i typed

ionic cordova plugin add cordova-plugin-camera-preview

and to solve the problem, i removed it and installed

ionic cordova plugin add https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview.git

but still does not work. i can't figure out the problem.

this is my info cli packages:

@ionic/cli-utils  : 1.6.0 (/Users/hbin/righthere/node_modules/ionic/node_modules/@ionic/cli-utils)
ionic (Ionic CLI) : 3.6.0 (/Users/hbin/righthere/node_modules/ionic)

global packages:

Cordova CLI : 7.0.1 

local packages:

@ionic/app-scripts              : 2.0.2
@ionic/cli-plugin-cordova       : 1.4.1
@ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms               : android 6.2.3 browser 4.1.0 ios 4.4.0
Ionic Framework                 : ionic-angular 3.5.3

System:

Node       : v8.1.3
OS         : macOS Sierra
Xcode      : Xcode 8.3.3 Build version 8E3004b 
ios-deploy : 1.9.1 
npm        : 5.0.3 
0

There are 0 answers