简体   繁体   中英

build ionic2 application failed

i have my first app here in github: https://github.com/eshk12/firstApp

i'm trying to build it to APK file, but it failed. i have install android sdk, and add android platform to the project.

but i get those error, i have no clue what the problem.

D:\ionic\firstApp>Ionic build android --v2 >> log.txt
[17:17:14]  Error: Error at D:/ionic/firstApp/.tmp/pages/currency/currency.ngfactory.ts:905:40
[17:17:14]  Property 'selectCurrencyInput' does not exist on type 'CurrencyPage'.
[17:17:14]  Error at D:/ionic/firstApp/.tmp/pages/currency/currency.ngfactory.ts:1200:43
[17:17:14]  Property 'selectCurrencyInput' does not exist on type 'CurrencyPage'.
[17:17:14]  Error at D:/ionic/firstApp/.tmp/pages/currency/currency.ngfactory.ts:1215:72
[17:17:14]  Property 'selectCurrencyInput' does not exist on type 'CurrencyPage'.
[17:17:14]  ngc failed
[17:17:14]  ionic-app-script task: "build"
[17:17:14]  Error: Error

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.3.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! ionic-app-base@ build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-app-base@ build script 'ionic-app-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-app-base package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ionic-app-base
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ionic-app-base
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\ionic\firstApp\npm-debug.log
Caught exception:
 undefined

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

thx for your help

In your view you're using a property called selectCurrencyInput

<ion-select okText="אשר" cancelText="בטל" [(ngModel)]="selectCurrencyInput">

but it's not declared in your component code .

@Component({
  selector: 'currency-page',
  templateUrl: 'currency.html',
  providers: [NetworkServices]
})
export class CurrencyPage {
  public load: any;
  public results: any;
  public amount: any;
  public keys: any;

  public selectCurrencyInput: string; // <- add this property to fix the issue

  constructor(public networkServices: NetworkServices) {
    this.load = false;
  }

  // ...
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM