2017-03-28 9 views
0

私はtypescriptでプロジェクトを開発しようとしていますが、私はjavascriptでライブラリを実行する必要があり、ライブラリのリンクはhttps://www.grabba.com/downloads/cordova/pluginです。ionicのモジュール "cordova/exec"を見つけることができません2

私のコードでこのライブラリを実行しようとすると、イオン2は上記のエラーを返します。私はそれを日ごとに解決しようとしており、既にGoogleの統合JavaScriptやタイスクリプトのチュートリアルをすべてパスしています。誰かが私にこの図書館の運営を手伝ってもらえますか

私のコードは怒鳴る従います。

グアルダ-codigo.tsを:

import { Component } from '@angular/core'; 
     import { NavController } from 'ionic-angular'; 
     import { GrabbaProxcard } from './com.grabba.cordova.plugin/www/grabba'; 

     declare var cordova: any; 

     /* 
      Generated class for the GuardaCodigo page. 

      See http://ionicframework.com/docs/v2/components/#navigation for more info on 
      Ionic pages and navigation. 
     */ 
     @Component({ 
      selector: 'page-guarda-codigo', 
      templateUrl: 'guarda-codigo.html' 
     }) 
     export class GuardaCodigoPage { 

      constructor(public nav: NavController) { 
       function acessaGrabba(value: number){ 
       let proxcard = new GrabbaProxcard(); 
       proxcard.prototype.registerCallback(); 
       } 
      } 

      ionViewDidLoad() { 
      console.log('ionViewDidLoad GuardaCodigoPage'); 
      } 

     } 

グアルダ-codigo.html:

<ion-header> 
    <ion-navbar> 
    <ion-title>GuardaCodigo</ion-title> 
    </ion-navbar> 

</ion-header> 

<ion-content class="registration"> 
<ion-list> 
    <ion-item> 
     <ion-label> Codigo</ion-label> 
     <ion-input type="text" name = "Codigo"></ion-input> 
    </ion-item> 
</ion-list> 
    <button ion-button onclick="acessaGrabba(2)">Trigger</button> 
</ion-content> 

誰かが私を助けてくださいことができ、私は本当に解決する必要がありますこの問題。私は非常に感謝します。注意していただきありがとうございます。

+0

package.jsonのためにエラーが発生しているようです。 package.jsonを提供してください –

答えて

0

{ 
    "name": "ionic-hello-world", 
    "author": "Ionic Framework", 
    "homepage": "http://ionicframework.com/", 


"private": true, 
    "scripts": { 
    "clean": "ionic-app-scripts clean", 
    "build": "ionic-app-scripts build", 
    "ionic:build": "ionic-app-scripts build", 
    "ionic:serve": "ionic-app-scripts serve" 
    }, 
    "dependencies": { 
    "@angular/common": "2.4.8", 
    "@angular/compiler": "2.4.8", 
    "@angular/compiler-cli": "2.4.8", 
    "@angular/core": "2.4.8", 
    "@angular/forms": "2.4.8", 
    "@angular/http": "2.4.8", 
    "@angular/platform-browser": "2.4.8", 
    "@angular/platform-browser-dynamic": "2.4.8", 
    "@angular/platform-server": "2.4.8", 
    "@ionic/storage": "2.0.0", 
    "cordova": "^6.5.0", 
    "exec": "^0.2.1", 
    "ionic-angular": "2.2.0", 
    "ionic-native": "2.8.1", 
    "ionicons": "3.0.0", 
    "rxjs": "5.0.1", 
    "sw-toolbox": "3.4.0", 
    "zone.js": "0.7.2" 
    }, 
    "devDependencies": { 
    "@ionic/app-scripts": "1.1.4", 
    "typescript": "2.0.9" 
    }, 
    "cordovaPlugins": [ 
    "com.grabba.cordova.plugin", 
    "cordova-plugin-whitelist", 
    "cordova-plugin-console", 
    "cordova-plugin-statusbar", 
    "cordova-plugin-device", 
    "cordova-plugin-splashscreen", 
    "cordova-sqlite-storage", 
    "ionic-plugin-keyboard" 
    ], 
    "cordovaPlatforms": [], 
    "description": "Rollers Monitor: An Ionic project" 
} 

以下の私のpackage.jsonに従ってくださいはあなたの助けをいただき、ありがとうございます。

関連する問題