ionic-team / ionic-team/ionic-cli
bug: -l --external Fails with Node 18
- 主要語言
- TypeScript
- 星號
- 2k
- 分支
- 682
- PR 合併指標
- 30 天內沒有已合併 PR
描述
### Prerequisites
- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.
### Ionic Framework Version
- [ ] v4.x
- [ ] v5.x
- [X] v6.x
- [ ] Nightly
### Current Behavior
On the command `ionic cap run ios -l --external -p 3000` it fails immediately when `npm run ionic:serve -- --host=0.0.0.0 --port=3000` is executed.
```
ERROR] No external network interfaces detected. In order to use the dev server externally you will need one.
Are you connected to a local network?
```
### Expected Behavior
App should be started on the iOS device with live reload.
### Steps to Reproduce
Upgrade to node v18 and run `ionic cap run ios -l --external -p 3000`
### Code Reproduction URL
_No response_
### Ionic Info
```
[WARN] Error loading @capacitor/android package.json: Error: Cannot find module '@capacitor/android/package'
Require stack:
- /usr/local/lib/node_modules/@ionic/cli/lib/project/index.js
- /usr/local/lib/node_modules/@ionic/cli/lib/index.js
- /usr/local/lib/node_modules/@ionic/cli/index.js
- /usr/local/lib/node_modules/@ionic/cli/bin/ionic
Ionic:
Ionic CLI : 6.18.1 (/usr/local/lib/node_modules/@ionic/cli)
Capacitor:
Capacitor CLI : 3.5.0
@capacitor/android : not installed
@capacitor/core : 3.5.0
@capacitor/ios : 3.5.0
Utility:
cordova-res : not installed globally
native-run : 1.5.0
System:
NodeJS : v18.0.0 (/opt/homebrew/Cellar/node/18.0.0/bin/node)
npm : 8.6.0
OS : macOS Monterey
```
### Additional Information
Apple M1 Max running macOS Monterey 12.3 (21E230)
貢獻指南
研究方向
使用 Node v18 和 `ionic cap run ios -l --external -p 3000` 重現該故障,然後檢查處理外部 live reload 網路的 Ionic CLI 入口點。追蹤在 `npm run ionic:serve -- --host=0.0.0.0 --port=3000` 之後使用的網路介面偵測邏輯;當 iOS 應用程式在外部介面上以 live reload 啟動時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- node.js, typescript
- 領域
- cli
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100