ionic-team / ionic-team/ionic-cli

bug: 'capacitor copy ios' wont run if there is linter warning using 'capacitor run ios -l'

未關閉
#4,183 1 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
triage
主要語言
TypeScript
星號
2k
分支
682
PR 合併指標
30 天內沒有已合併 PR

描述

# Bug Report

## Capacitor Version

`npx cap doctor` output:
Latest Dependencies:

@capacitor/cli: 1.2.1

@capacitor/core: 1.2.1

@capacitor/android: 1.2.1

@capacitor/ios: 1.2.1

Installed Dependencies:

@capacitor/cli 1.2.1

@capacitor/core 1.2.1

@capacitor/android 1.2.1

@capacitor/ios 1.2.1

[success] Android looking great! 👌
Found 1 Capacitor plugin for ios:
phonegap-plugin-barcodescanner (8.1.0)
[success] iOS looking great! 👌

## Affected Platform(s)

- [ ] Android (Not sure)
- [x] iOS
- [ ] Electron (Not sure)
- [ ] Web (Not sure)

## Current Behavior
run ``ionic capacitor run ios -l --address=0.0.0.0``

``capacitor copy ios`` won't run if there is linter warning, for example:
``
> react-scripts start
[react-scripts] Attempting to bind to HOST environment variable: 0.0.0.0
[react-scripts] If this was unintentional, check that you haven't mistakenly set it in your shell.
[react-scripts] Learn more here: https://bit.ly/CRA-advanced-config
[react-scripts] Starting the development server...
[react-scripts]
[react-scripts] Compiled with warnings.
[react-scripts]
[react-scripts] ./node_modules/@angular/core/fesm5/core.js
[react-scripts] Critical dependency: the request of a dependency is an expression
[react-scripts] ./node_modules/@angular/core/fesm5/core.js
[react-scripts] Critical dependency: the request of a dependency is an expression
[react-scripts] ./node_modules/@angular/core/fesm5/core.js
[react-scripts] System.import() is deprecated and will be removed soon. Use import() instead.
[react-scripts] For more info visit https://webpack.js.org/guides/code-splitting/
[react-scripts] ./node_modules/@angular/core/fesm5/core.js
[react-scripts] System.import() is deprecated and will be removed soon. Use import() instead.
[react-scripts] For more info visit https://webpack.js.org/guides/code-splitting/
[react-scripts] Search for the keywords to learn more about each warning.
[react-scripts] To ignore, add // eslint-disable-next-line to the line before.
``

## Expected Behavior
``capacitor copy ios`` will run even if there is linter warning.

## Reproduction Steps
I am using Ionic React Typescript Capacitor.
If there is linter warning, for example,
``System.import() is deprecated and will be removed soon. Use import() instead.``
or
``Line 5:10: 'xxx' is defined but never used @typescript-eslint/no-unused-vars``
When I tried to start a development server and run on iOS with live reload with``ionic capacitor run ios -l --address=0.0.0.0``

capacitor copy ios will not run.
The local development server is started though. I can verify it on my browser.

Also, if there is no linter warning, the same command will be able to copy ios successfully and start run on iOS with live reload.

Note that ``ionic capacitor run ios`` is able to run copy ios even if there is linter warning.

`npm --version` output:
6.9.0
`node --version` output:
v10.16.3
`pod --version` output (iOS issues only):
1.8.3

貢獻指南

開啟貢獻指南

研究方向

Reproduce the issue with `ionic capacitor run ios -l --address=0.0.0.0` using the reported linter-warning examples, then compare it with `ionic capacitor run ios` without live reload. The work is done when `capacitor copy ios` completes and iOS live reload starts despite those warnings.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
typescript
領域
cli
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。