ionic-team / ionic-team/ionic-cli
Ionic serve launches browser to "Invalid Host header" only
- 主要語言
- TypeScript
- 星號
- 2k
- 分支
- 681
- PR 合併指標
- 30 天內沒有已合併 PR
描述
# Bug Report
**Ionic Info**
```
Ionic:
ionic (Ionic CLI) : 4.0.1 (/home/david/.nvm/versions/node/v9.11.2/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.0
@angular-devkit/core : 0.7.0-rc.3
@angular-devkit/schematics : 0.7.0-rc.3
@angular/cli : 6.0.8
@ionic/ng-toolkit : 1.0.0
@ionic/schematics-angular : 1.0.1
System:
NodeJS : v9.11.2 (/home/david/.nvm/versions/node/v9.11.2/bin/node)
npm : 5.6.0
OS : Linux 4.14
```
**Describe the Bug**
In a new Ionic v4 beta project when I simply run `ionic serve` it launches a browser but only displays the message "Invalid Host header" as the only page content.
**Steps to Reproduce**
Steps to reproduce the behavior:
(Follow exact steps in docs for a new v4 beta project.)
1. `npm install -g ionic`
2. `ionic start myApp tabs --type=angular`
3. `ionic serve`
4. See error in browser
**Related Code**
N/A
**Expected Behavior**
That it launches the app content in the browser.
**Additional Context**
I'm on a Pixelbook so running inside a LXC container so this issue might be limited to containers.
Maybe a workaround would be to configure webpack to work with the Chrome OS Linux LXC container (aka Crostini) default hostname of `penguin.linux.test`?
貢獻指南
研究方向
首先,在回報的環境中使用 `ionic start myApp tabs --type=angular`,接著執行 `ionic serve`,重現此問題。閱讀 Ionic CLI 的 serve 路徑及其 webpack 設定,然後驗證瀏覽器顯示的是應用程式內容,而不是 `Invalid Host header`。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- angular, typescript, webpack
- 領域
- cli, web-dev
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100