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

bug: Unable to use Ionic DevApp #4124

Closed
ionitron-bot bot opened this issue Aug 16, 2019 · 2 comments
Closed

bug: Unable to use Ionic DevApp #4124

ionitron-bot bot opened this issue Aug 16, 2019 · 2 comments
Labels

Comments

@ionitron-bot
Copy link

ionitron-bot bot commented Aug 16, 2019

Original issue by @Zerokk on 2019-08-16T16:04:56Z

Summary: I can't use the Ionic DevApp environment, since I'm getting an error. Below, details about my system, the bug itself, and how to replicate:

Bug Report

Ionic version:
Using Ionic-native 5, with the following devDependencies that are related to Ionic and Angular:

"@angular-devkit/architect": "^0.13.0",
"@angular-devkit/build-angular": "~0.13.9",
"@angular-devkit/core": "^7.3.0",
"@angular-devkit/schematics": "^7.3.0",
"@angular/compiler": "~7.2.3",
"@angular/compiler-cli": "~7.2.3",
"@angular/language-service": "~7.2.3",
"@ionic/angular-toolkit": "^2.0.0",
"@ionic/app-scripts": "^3.2.4",

Current behavior:
When I try to use the command:

ionic serve --devapp

... I get the following error:

> ng.cmd run app:ionic-cordova-serve --host=0.0.0.0 --port=8100 --cordova-mock --consolelogs --consolelogs-port=53703
[ng] Schema validation failed with the following errors:
[ng]   Data path ".builders['cordova-build']" should have required property 'class'.

[ERROR] ng has unexpectedly closed (exit code 1).

Expected behavior:
It should be serving the app and letting me use it from my smartphone.

Steps to reproduce:

  1. First, the project. This project is some months old, and suffered various migrations until these latest versions of Ionic.
  2. I was being able to correctly build Android APKs that target the 7th version of this OS. They were working okay, except for very known bugs as the back button bug and so on. I was currently trying to fix this precise feature.
  3. As I had to test various approaches, I wanted to use the very useful Ionic DevApp for that purpose, as I did in the past. Therefore, I tried using the command to serve it, but it didn't work. It started giving a different error:
> ng.cmd run app:ionic-cordova-serve --host=0.0.0.0 --port=8100 --cordova-mock --consolelogs --consolelogs-port=53703
[ng] Unknown option: '--consolelogs'
[ng] Unknown option: '--consolelogs-port'

[ERROR] ng has unexpectedly closed (exit code 1).
  1. I looked for solutions online, and stumbled upon this solution. I updated the package, but then it started giving the error I reported before. Afterwards, I went to this other solution. But it didn't work.

Ionic info:
Interesting thing: when I try to input "ionic info", I get this error:

[ERROR] Error loading @angular/cli package.json: Error: Cannot find module '@angular/cli/package'

...though it still gives me the following information:

Ionic CLI : 5.2.5 (C:\Users\zerok\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.0
@angular/cli : not installed
@ionic/angular-toolkit : 2.0.0

Cordova:

Cordova CLI : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 11 other plugins)

Utility:

cordova-res : not installed
native-run : not installed

System:

NodeJS : v11.8.0 (C:\Program Files\nodejs\node.exe)
npm : 6.5.0
OS : Windows 10


Thank you for any help you can provide! If this ends up being a global bug, hopefully it gets to be fixed.

@imhoffd
Copy link
Contributor

imhoffd commented Aug 19, 2019

@Zerokk I think this is a duplicate of ionic-team/angular-toolkit#166

@senseijames
Copy link

I was not able to get DevApp working with Angular 7; I had to upgrade to Angular 8, which itself (code-wise) was not very time consuming; what took MUCH longer was updating all the Angular and Ionic dependencies (including having to upgrade nodejs and npm) and build settings and whatnot.

I recommend upgrading the latest version of the Ionic CLI globally, as well as npm, nodejs and Angular CLI globally, then generating a new Ionic project. Test if that works in DevApp (it should), then look at its package.json for the dependencies (and devDependencies) you'll need in your older Ionic project.

@imhoffd imhoffd closed this as completed Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants