我有一个Ionic4应用,试图通过ionic serve
在iPad的DevApp上运行。但是,它似乎只在本地提供服务...
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.
我尝试将ionic serve --address ...
与IP地址一起使用,但出现此错误...
Provided host could NOT be bound. Please provide a different host address or hostname
我也尝试过ionic serve --devapp
,但随后出现此错误...
Data path ".builders['cordova-build']" should have required property 'class'.
我是Ionic的新手,所以我可能缺少一些基本的知识。有什么想法吗?
答案 0 :(得分:0)
听起来像upgraded your Ionic CLI from 4 to 5 but not the other related packages。
尝试:
"@angular-devkit/build-angular": "(version number here)"
更新为"^0.800.6"
npm install
注意:链接的帖子说更新到"^0.12.4"
,但似乎他们误解了版本号,因为这是一个较旧的发行版。我会尝试先更新到最新版本。
答案 1 :(得分:0)
尝试一下,
ionic cordova运行ios -l --devapp
参考https://ionicframework.com/docs/cli/commands/cordova-run
Ionic CLI最近更新到了v5.2.1,它做了一些更改。