Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors during build #9

Closed
thomastthai opened this issue Nov 6, 2016 · 8 comments
Closed

Errors during build #9

thomastthai opened this issue Nov 6, 2016 · 8 comments

Comments

@thomastthai
Copy link

Here are the errors when I tried to build:

--- this part worked fine ---
Thomas@Sammy MINGW64 ~/ionic2/ionic-2-examples/file-transfer-upload (master)
$ ionic state reset
Removed platforms and plugins
Attempting to restore your Ionic application from package.json
Restoring Platforms
Restore platforms is complete
Restoring Plugins

cordova plugin add cordova-plugin-device
cordova plugin add cordova-plugin-console
cordova plugin add cordova-plugin-whitelist
cordova plugin add cordova-plugin-splashscreen
cordova plugin add cordova-plugin-statusbar
cordova plugin add ionic-plugin-keyboard
cordova plugin add cordova-plugin-camera
cordova plugin add cordova-plugin-file-transfer
cordova plugin add cordova-plugin-file
cordova plugin add https://github.com/wymsee/cordova-imagePicker
Restore plugins is complete
Ionic state restore completed
Ionic reset state complete
--- end ---

--- this next part created many errors ---
$ ionic run android

Running 'run:before' gulp task before run
[00:59:24] Starting 'clean'...
[00:59:24] Finished 'clean' after 54 ms
[00:59:24] Starting 'build'...
[00:59:24] Starting 'sass'...
[00:59:24] Starting 'html'...
[00:59:24] Starting 'fonts'...
[00:59:24] Starting 'scripts'...
app\theme\app.variables.scss
Error: File to import not found or unreadable: globals.core
Parent style sheet: C:/Users/Thomas/ionic2/ionic-2-examples/file-transfer-upload/app/theme/app.variables.scss
on line 7 of app/theme/app.variables.scss

@import 'globals.core';
^

[00:59:24] Finished 'sass' after 108 ms
[00:59:24] Finished 'html' after 117 ms
[00:59:24] Finished 'scripts' after 119 ms
[00:59:24] Finished 'fonts' after 144 ms
TypeScript error: C:/Users/Thomas/ionic2/ionic-2-examples/file-transfer-upload/node_modules/ionic-angular/components/img/img.d.ts(24,14): Error TS1005: '=' expected.
TypeScript error: C:/Users/Thomas/ionic2/ionic-2-examples/file-transfer-upload/node_modules/ionic-angular/components/img/img.d.ts(24,20): Error TS1005: ';' expected.
TypeScript error: C:/Users/Thomas/ionic2/ionic-2-examples/file-transfer-upload/node_modules/ionic-angular/components/img/img.d.ts(25,14): Error TS1005: '=' expected.
TypeScript error: C:/Users/Thomas/ionic2/ionic-2-examples/file-transfer-upload/node_modules/ionic-angular/components/img/img.d.ts(25,21): Error TS1005: ';' expected.
TypeScript error: C:/Users/Thomas/ionic2/ionic-2-examples/file-transfer-upload/node_modules/ionic-angular/components/label/label.d.ts(11,14): Error TS1005: '=' expected.
TypeScript error: C:/Users/Thomas/ionic2/ionic-2-examples/file-transfer-upload/node_modules/ionic-angular/components/label/label.d.ts(11,18): Error TS1005: ';' expected.
TypeScript error: C:/Users/Thomas/ionic2/ionic-2-examples/file-transfer-upload/node_modules/ionic-angular/components/menu/menu-toggle.d.ts(13,14): Error TS1005: '=' expected.
TypeScript error: C:/Users/Thomas/ionic2/ionic-2-examples/file-transfer-upload/node_modules/ionic-angular/components/menu/menu-toggle.d.ts(13,22): Error TS1005: ';' expected.
...

TypeScript error: C:/Users/Thomas/ionic2/ionic-2-examples/file-transfer-upload/node_modules/rxjs/scheduler/VirtualTimeScheduler.d.ts(30,68): Error TS1005: ',' expected.
TypeScript error: C:/Users/Thomas/ionic2/ionic-2-examples/file-transfer-upload/node_modules/rxjs/scheduler/VirtualTimeScheduler.d.ts(30,76): Error TS1005: ')' expected.
TypeScript error: C:/Users/Thomas/ionic2/ionic-2-examples/file-transfer-upload/node_modules/rxjs/scheduler/VirtualTimeScheduler.d.ts(31,1): Error TS1128: Declaration or statement expected.
[00:59:27] Finished 'build' after 2.87 s
[00:59:27] Starting 'run:before'...
[00:59:27] Finished 'run:before' after 6.64 μs

• You're trying to build for android, but don't have the platform installed yet.
∆ Installing android for you.
√ Installed platform android
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\Thomas\ionic2\ionic-2-examples\file-transfer-upload\hooks\after_prepare\010_add_platform_class.js C:/Users/Thomas/ionic2/ionic-2-examples/file-transfer-upload
add to body class: platform-android
Running command: cmd "/s /c "C:\Users\Thomas\ionic2\ionic-2-examples\file-transfer-upload\platforms\android\cordova\run.bat""
ERROR: Error: Please install Android target: "android-22".

Hint: Open the SDK manager by running: C:\adt\sdk\tools\android.BAT
You will require:

  1. "SDK Platform" for android-22
  2. "Android SDK Platform-tools (latest)
  3. "Android SDK Build-tools" (latest)
    ERROR running one or more of the platforms: Error: cmd: Command failed with exit code 2
    You may not have the required environment or OS to run this project

Thomas@Sammy MINGW64 ~/ionic2/ionic-2-examples/file-transfer-upload (master)
$ ^C

Thomas@Sammy MINGW64 ~/ionic2/ionic-2-examples/file-transfer-upload (master)
$ ionic add android

Bower error, check that "undefined" exists,
or try running "undefined" for more info. (CLI v2.0.0-beta.25)

Your system information:

Cordova CLI: 5.4.1
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
OS:
Node Version: v6.9.1


@dtaalbers
Copy link
Owner

Hi,

Well its still on a very old ionic build. That is probably the cause it won't build anymore. I intend to upgrade them to the latest ionic build when I find some time for it.

@thomastthai
Copy link
Author

Thanks for the quick reply. That was what I figured. I look forward to the update!

@thomastthai
Copy link
Author

thomastthai commented Nov 6, 2016

I went through and started with fresh app:

ionic start upload tabs

and started editing and moving your files over. I got through a lot of the errors and finally was able to get it to build and load into my phone. When clicking on either of the "Open camera" and Open album" buttons, it doesn't open anything. Is there a way I can view debug info while launching it on my phone?

I created my first git and uploaded my files. Hopefully this will save you some time in updating your files. I am still learning github so if that's not the right way to do it, sorry!

@thomastthai
Copy link
Author

This article helped me debug the app while it's running on the device. I was able to see that a couple of the Cordova plugins weren't installed.

@thomastthai
Copy link
Author

Yahoo! After adding all those plugins, both buttons worked. They opened up both the camera and the gallery image picker! There was a pop-up that did as for permission to access the media. I think it's a one time deal from Android.
allowmediaaccess

@shahidkarimi
Copy link

This bullshit repo stopped my cordova working. Its just a piece of garbbage. I mistakenly run the install ionic beta....

@dtaalbers
Copy link
Owner

@shahidkarimi excuse me?

@dtaalbers
Copy link
Owner

@thomastthai Sorry it has been a while. That is right, with android 6.0.0 android apps need permission to use the device's hardware. Check out my latest examples in this brand new app release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants