Adir Zoari Adir Zoari - 1 month ago 40
Android Question

Ionic run android failed

i'm trying to export my app and i run ionic run android and it failed.

C:\Users\xxxx\myapps\xxxxx>ionic run android

Running 'run:before' npm script before run

ionic-hello-world@ build C:\Users\xxx\xxx\xxx
ionic-app-scripts build
[20:33:14] ionic-app-scripts 0.0.41
[20:33:14] build prod started ...
[20:33:14] clean started ...
[20:33:14] clean finished in 4 ms
[20:33:14] copy started ...
[20:33:14] ngc started ...
[20:33:14] copy finished in 63 ms
[20:33:15] lint started ...
[20:33:16] tslint: C:/Users/adirz/myapps/sceSchedule/src/pages/tabs/tabs.ts, line: 3
Unused import: 'HomePage'
L3: import { HomePage } from '../home/home';
L4: import { AboutPage } from '../about/about';
[20:33:16] tslint: C:/Users/adirz/myapps/sceSchedule/src/pages/courses-page/courses-page.ts, line: 5

Unused import: 'course'
L4: import {CoursesData} from "../../providers/courses-data";
L5: import {course} from "../../models/Course";
[20:33:16] lint finished in 1.60 s
[20:33:25] Error: Error at C:/Users/adirz/myapps/sceSchedule/.tmp/pages/courses-page/courses-page.ngfactory.ts:884:42

[20:33:25] Property 'addDep' does not exist on type 'CoursesPage'.
[20:33:25] Error at C:/Users/adirz/myapps/sceSchedule/.tmp/pages/courses-page/courses-page.ngfactory.ts:889:42
[20:33:25] Property 'addDep' does not exist on type 'CoursesPage'.

[20:33:25] ngc failed
[20:33:25] ionic-app-script task: "build"
[20:33:25] Error: Error

npm
ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build"
npm
ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR!
ionic-hello-world@ build: ionic-app-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ 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-hello-world 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-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\adirz\myapps\sceSchedule\npm-debug.log

Caught exception:
undefined

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

C:\Users\adirz\myapps\sceSchedule>


i deleted the tmp folder it says there and still i have the issue.
i tried to close the program and restart again and still i have the same issue

Answer

Try to add addDep in your courses-page since error says that addDep is missing.

  [20:33:25] Property 'addDep' does not exist on type 'CoursesPage'.
    [20:33:25] Error at C:/Users/adirz/myapps/sceSchedule/.tmp/pages/courses-page/courses-page.ngfactory.ts:889:42
    [20:33:25] Property 'addDep' does not exist on type 'CoursesPage'.