Skip to content

vue-cli-service build 执行时卡住 #5286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
blueskink opened this issue Mar 18, 2020 · 3 comments · Fixed by #5315
Closed

vue-cli-service build 执行时卡住 #5286

blueskink opened this issue Mar 18, 2020 · 3 comments · Fixed by #5315
Labels

Comments

@blueskink
Copy link

Version

4.2.3

Environment info

vue info 同样无法执行
环境: docker 容器

Linux 3c44b9dfd301 4.19.76-linuxkit #1 SMP Thu Oct 17 19:31:58 UTC 2019 x86_64 GNU/Linux

google-chrome --version
Chromium 64.0.3282.119 built on Debian 9.3, running on Debian 9.4

Steps to reproduce

执行“npm run build”

What is expected?

正常执行

What is actually happening?

root@3c44b9dfd301:/source# npm run build

> [email protected] build /source
> vue-cli-service build
卡在此处

###问题定位:
因为在问题环境下“google-chrome --version”命令卡住(原因未知),导致“browsers.chrome = getLinuxAppVersion('google-chrome')”代码执行永久性阻塞。最终表现为所述问题。

root@3c44b9dfd301:/source# google-chrome --version                                                 
Chromium 64.0.3282.119 built on Debian 9.3, running on Debian 9.4
卡在此处,不退出
@haoqunjiang
Copy link
Member

但是这个为什么会影响 build?
installedBrowsers 只在运行 test:e2e 或者创建项目时才用到啊……

@blueskink
Copy link
Author

导出时就检测了,不是用的时候才检测的。

@haoqunjiang
Copy link
Member

明白了,是这行代码触发了 getter

Object.assign(exports, require(`./lib/${m}`))

haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this issue Mar 25, 2020
haoqunjiang added a commit that referenced this issue Mar 31, 2020
* fix: add a timeout, avoid process hanging

fixes #5310

* fix: avoid accidentally trigerring the `installedBrowsers` getter

fixes #5286
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants