ionic-team / ionic-team/ionic-cli

Building Android with --production flag prevents cmd/script from exiting properly

未关闭
#3,349 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
triage
主要语言
TypeScript
星标
2k
派生
682
PR 合并指标
30 天内没有已合并 PR

描述

# Bug Report

**Ionic Info**

```
cli packages: (C:\Users\Administrator\AppData\Roaming\nvm\v9.4.0\node_modules)

@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0

System:

Node : v9.4.0
npm : 5.6.0
OS : Windows 10

Misc:

backend : pro
```

**Describe the Bug**

Building a production build of a ionic cordova android apk causes batch scripts to hang indefinitely until the script window is force terminated. Note this only happens when using the --release flag. If the release flag is not used, then batch scripts exit successfully

i.e.
```
Running `ionic cordova build android` builds a valid APK and exits with 0

Running 'ionic cordoca build --release android' builds a valid APK but hangs on exit. It appears there is a npm process in the background preventing cmd from fully exiting when using the --production flag
```

**Steps to Reproduce**
Steps to reproduce the behavior:

1. Launch a new CMD terminal
2. Enter a Ionic workspace that can be build for Android
3. Run `ionic cordova build android` and wait for it to finish the build
4. Run `exit 0'
5. Note that CMD terminal should close successfully
6. Launch a new CMD terminal
7. Enter the same Ionic workspace as before
8. Run `ionic cordova build --release android` and wait for it to finish the build
9. Run `exit 0'
10. Note that CMD terminal hangs and has to be force closed

**Expected Behavior**
running `ionic cordova build --release android` should exit successfully after successful or failed builds without hanging the CMD instance.

**Additional Context**
This issue is preventing our build system from continuing after building a APK flagged with the --release flag. The only work around we have been able to find is to not use the production flag

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。