0

I have an Ionic4 app that I'm trying to run on my iPad's DevApp with ionic serve. However, it only seems to be serving locally...

ionic serve
> ng run app:serve --host=localhost --port=8100
[INFO] Waiting for connectivity with ng...

[INFO] Development server running!

       Local: http://localhost:8100

       Use Ctrl+C to quit this process

[INFO] Browser window opened to http://localhost:8100!

[ng] ℹ 「wdm」: wait until bundle finished: /
[ng] 
[ng] Date: 2019-06-27T22:09:04.521Z
[ng] Hash: e5b1e27f4608e1891cc1
[ng] Time: 25929ms
[ng] chunk {_pages-private-new-order-order-confirmation-order-confirmation-module} _pages-private-new-order-order-confirmation-order-confirmation-module.js, _pages-private-new-order-order-confirmation-order-confirmation-module.js.map (_pages-private-new-order-order-confirmation-order-confirmation-module) 13.7 kB  [rendered]
[ng] chunk {common} common.js, common.js.map (common) 6.24 kB  
 ... and 164 additional chunks
[ng] ℹ 「wdm」: Compiled successfully.

I tried using ionic serve --address ... with my IP address, but I get this error...

Provided host could NOT be bound. Please provide a different host address or hostname

I also tried ionic serve --devapp, but then I get this error...

Data path ".builders['cordova-build']" should have required property 'class'.

I'm new to Ionic, so I could be missing something basic. Any ideas?

nachshon f
  • 3,540
  • 7
  • 35
  • 67

2 Answers2

0

Sounds like you might have upgraded your Ionic CLI from 4 to 5 but not the other related packages.

Try:

  • Open package.json
  • Update the line from "@angular-devkit/build-angular": "(version number here)" to "^0.800.6"
  • run npm install

Note: The linked post says update to "^0.12.4" but it seems like they have misunderstood the version numbers as this is a significantly older release. I would try updating to the latest version first.

rtpHarry
  • 13,019
  • 4
  • 43
  • 64
  • When I change it to "^0.800.6", I get this error after running `ionic serve` - `Data path ".builders['app-shell']" should have required property 'class'.` – nachshon f Jun 28 '19 at 13:48
  • 1
    have you tried starting a new project with `ionic start` and the testing if that works. This will rule out if its a system issue or if its something to do with that specific app. – rtpHarry Jun 29 '19 at 05:46
0

Try this,

ionic cordova run ios -l --devapp

Ref https://ionicframework.com/docs/cli/commands/cordova-run

Ionic CLI was updated to v5.2.1 recently, it has changed a few things.

Chetan Bansal
  • 1,794
  • 14
  • 18