Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

when livereload-url is specified, the development server is not started.

オープン
#5,124 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
typescript
領域
cli

調査の方向性

packages/@ionic/cli/src/commands/capacitor/base.ts から始め、レポートにある2つのコマンド形式と併せて runServe を調べてください。--livereload-url を付けてコマンドを再現し、開発サーバーが起動して指定された URL が使用されることを確認してください。すでに作業が進行中であると issue に報告されているため、開始前に pull request 5125 を確認してください。

索引モデルが issue の本文から書いたものです。

説明

triage

Description:
with this command "ionic capacitor run android -l --external --host=192.168.7.78 --port=8021" the development server will be started. everything goes well. app will use http://192.168.7.78:8021/ to access the web app.
but with this command "ionic capacitor run android -l --external --host=192.168.7.78 --port=8021 --livereload-url=http://192.168.7.78:8021", the development serve does not start.

why do I want to specify host & port & the url? for whatever reason, my reality is that the android is connected to a "different" network, and there is some mapping, so even the livereload-url=https://x.y.z/(different IP, DNS or not, and even https), it will be mapped to http://192.168.7.78:8021.

Steps to Reproduce:
so simple, so need big effort.

Output:
so simple, no need

My ionic info:

Other Information:

To fix:
https://github.com/ionic-team/ionic-cli/blob/develop/packages/%40ionic/cli/src/commands/capacitor/base.ts
inside runServe function

  let serverUrl = options['livereload-url'] ? String(options['livereload-url']) : undefined;
  if (!serverUrl) {
    const details = await runner.run(runnerOpts);    //*********
    serverUrl = `${details.protocol || 'http'}://${details.externalAddress}:${details.port}`;
  }

we just have to move the ***** line out of the if statement, then everything is Okay. If I am wrong, please inform me.

If this is the right solution, then I made a pull request 5125: https://github.com/ionic-team/ionic-cli/pull/5125

主要言語
TypeScript
スター
2k
フォーク
681
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ionic-team/ionic-cli のほかの issue

ionic-team/ionic-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。