`ionic serve` is only deploying locally - not in DevApp

1.9k Views Asked by At

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?

2

There are 2 best solutions below

2
On

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.

0
On

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.