when livereload-url is specified, the development server is not started.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
Bắt đầu trong packages/@ionic/cli/src/commands/capacitor/base.ts và kiểm tra runServe cùng với hai dạng lệnh trong báo cáo. Tái hiện lệnh với --livereload-url và xác minh rằng máy chủ phát triển khởi động trong khi URL được cung cấp được sử dụng; xem lại pull request 5125 trước khi bắt đầu vì issue cho biết công việc đã được tiến hành.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 2k
- Fork
- 681
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ionic-team/ionic-cli
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
ionic-team/ionic-cli#5016 ·
-
ionic-cli development status Đang mởtriage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
ionic-team/ionic-cli#5131 ·
-
triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
ionic-team/ionic-cli#5130 ·
-
triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
ionic-team/ionic-cli#5129 ·
-
triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
ionic-team/ionic-cli#5127 · 2 bình luận ·
Tất cả issue của ionic-team/ionic-cli
Issue tương tự
-
Browser Waiting for: Product Owner
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
getsentry/sentry-javascript#24577 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
agilepathway/label-checker#640 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
copse-dev/agent-pane#2953 ·
-
[aw] Upgrade available Đang mởagentic-workflows
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
anomalyco/models.dev#7701 ·