Skip to content
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

Trying to use my own internal library causes vue serve to 100% CPU #5653

Closed
kennydude opened this issue Jul 6, 2020 · 4 comments
Closed
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author

Comments

@kennydude
Copy link

Version

4.4.6

Reproduction link

https://github.com/kennydude/broken-vue

Environment info

Environment Info:

  System:
    OS: Linux 4.19 Ubuntu 20.04 LTS (Focal Fossa)
    CPU: (4) x64 AMD Ryzen 3 3200G with Radeon Vega Graphics
  Binaries:
    Node: 10.19.0 - /usr/bin/node
    Yarn: 1.22.4 - /usr/bin/yarn
    npm: 6.14.4 - /usr/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.1.2
    @vue/babel-preset-app:  4.4.6
    @vue/babel-preset-jsx:  1.1.2
    @vue/babel-sugar-functional-vue:  1.1.2
    @vue/babel-sugar-inject-h:  1.1.2
    @vue/babel-sugar-v-model:  1.1.2
    @vue/babel-sugar-v-on:  1.1.2
    @vue/cli-overlay:  4.4.6
    @vue/cli-plugin-babel: ~4.4.0 => 4.4.6
    @vue/cli-plugin-eslint: ~4.4.0 => 4.4.6
    @vue/cli-plugin-router: ~4.4.0 => 4.4.6
    @vue/cli-plugin-vuex:  4.4.6
    @vue/cli-service: ~4.4.0 => 4.4.6
    @vue/cli-shared-utils:  4.4.6
    @vue/component-compiler-utils:  3.1.2
    @vue/preload-webpack-plugin:  1.1.1
    @vue/web-component-wrapper:  1.2.0
    eslint-plugin-vue: ^6.2.2 => 6.2.2
    svg-to-vue:  0.7.0
    vue: ^2.6.11 => 2.6.11
    vue-eslint-parser:  7.1.0
    vue-hot-reload-api:  2.3.4
    vue-i18n:  8.18.2
    vue-loader:  15.9.3
    vue-router: ^3.2.0 => 3.3.4
    vue-style-loader:  4.1.2
    vue-svg-loader:  0.16.0
    vue-template-compiler: ^2.6.11 => 2.6.11
    vue-template-es2015-compiler:  1.9.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

Yarn install everything. Run yarn serve. Use htop. Find out it's using 100% CPU. Kill nodejs.

Note using yarn build works perfectly

What is expected?

Yarn compiles and serves the sample application.

What is actually happening?

Yarn gets stuck, tries to import additional components out of the library (I didn't ask it to?) and then hits 100% CPU.


I don't know which part of Vue is causing this, if any so apologies in advance is this is nothing to do with Vue, or a fault with my package.

@haoqunjiang
Copy link
Member

The linked repository is empty

@haoqunjiang haoqunjiang added the needs reproduction This issue is missing a minimal runnable reproduction, provided by the author label Jul 7, 2020
@kennydude
Copy link
Author

ah sorry, code is there now

@haoqunjiang
Copy link
Member

There're errors in the FormControl component template.

v-else-if="type === 'textarea'" used on element <textarea> without corresponding v-if.
v-else-if="type !== 'slot'" used on element <input> without corresponding v-if.
v-else used on element <slot> without corresponding v-if. 

But when trying to report the compilation errors, because the file uses CRLF as the line ending, it ran into this bug: vuejs/vue#10547

@kennydude
Copy link
Author

ah thanks. the joys of just moving to a windows machine messing up my line endings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author
Projects
None yet
Development

No branches or pull requests

2 participants