Skip to content

vue-cli-service build fails in the first run. #5826

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
ngtlin opened this issue Aug 25, 2020 · 3 comments
Closed

vue-cli-service build fails in the first run. #5826

ngtlin opened this issue Aug 25, 2020 · 3 comments

Comments

@ngtlin
Copy link

ngtlin commented Aug 25, 2020

Version

4.5.2

Reproduction link

https://github.com/ngti/factory-portal

Environment info


  System:
    OS: macOS 10.15.6
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  Binaries:
    Node: 12.18.2 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.7 - /usr/local/bin/npm
  Browsers:
    Chrome: 84.0.4147.135
    Edge: Not Found
    Firefox: 79.0
    Safari: 13.1.2
  npmPackages:
    @ant-design-vue/babel-helper-vue-transform-on:  1.0.1 
    @panter/vue-i18next: ^0.15.2 => 0.15.2 
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-plugin-transform-vue-jsx:  1.1.2 
    @vue/babel-preset-app:  4.5.2 
    @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.5.2 
    @vue/cli-plugin-babel: ~4.5.0 => 4.5.2 
    @vue/cli-plugin-e2e-nightwatch: ~4.5.0 => 4.5.2 
    @vue/cli-plugin-eslint: ~4.5.0 => 4.5.2 
    @vue/cli-plugin-router: ~4.5.0 => 4.5.2 
    @vue/cli-plugin-unit-mocha: ~4.5.0 => 4.5.2 
    @vue/cli-plugin-vuex: ~4.5.0 => 4.5.2 
    @vue/cli-service: ~4.5.0 => 4.5.2 
    @vue/cli-shared-utils:  4.5.2 
    @vue/component-compiler-utils:  3.2.0 
    @vue/eslint-config-airbnb: ^5.0.2 => 5.1.0 
    @vue/preload-webpack-plugin:  1.1.2 
    @vue/test-utils: ^1.0.3 => 1.0.3 
    @vue/web-component-wrapper:  1.2.0 
    eslint-plugin-vue: ^6.2.2 => 6.2.2 
    vue: ^2.6.11 => 2.6.11 
    vue-cli-plugin-i18n: ~1.0.1 => 1.0.1 
    vue-eslint-parser:  7.1.0 
    vue-hot-reload-api:  2.3.4 
    vue-i18n:  8.20.0 
    vue-i18n-extract:  1.0.2 
    vue-loader:  15.9.3 (16.0.0-beta.5)
    vue-modal-dialogs: ^3.0.0 => 3.0.0 
    vue-router: ^3.2.0 => 3.4.2 
    vue-style-loader:  4.1.2 
    vue-template-compiler: ^2.6.11 => 2.6.11 
    vue-template-es2015-compiler:  1.9.1 
    vuelidate: ^0.7.5 => 0.7.5 
    vuelidate-error-extractor: ^2.4.1 => 2.4.1 
    vuex: ^3.4.0 => 3.5.1 
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

I have a local repo installed as file.

"dependencies": {
"@panter/vue-i18next": "^0.15.2",
"axios": "^0.19.2",
"core-js": "^3.6.5",
"i18next": "^19.6.3",
"sdx": "file:sdx",
"vue": "^2.6.11",
"vue-modal-dialogs": "^3.0.0",
"vue-router": "^3.2.0",
"vuelidate": "^0.7.5",
"vuelidate-error-extractor": "^2.4.1",
"vuex": "^3.4.0"
},

after npm install, run 'npm run build' which invoke 'vue-cli-service build'. It failed with a lot of linting errors for the local file mounted package. But execute 'npm run build' command again, the build successfully finished. It seems that some intermediate build steps failed in the first run.

What is expected?

The build process should be successful in one single run.

What is actually happening?

Failed at the first run, and success in the consecutive second run.


info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]prebuild: [email protected]
6 info lifecycle [email protected]
build: [email protected]
7 verbose lifecycle [email protected]build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
build: PATH: ...
9 verbose lifecycle [email protected]build: CWD: /Users/lin/Development/factory-portal
10 silly lifecycle [email protected]
build: Args: [ '-c', 'vue-cli-service build' ]
11 silly lifecycle [email protected]build: Returned: code: 1 signal: null
12 info lifecycle [email protected]
build: Failed to exec build script
13 verbose stack Error: [email protected] build: vue-cli-service build
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/lin/Development/factory-portal
16 verbose Darwin 19.6.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v12.18.2
19 verbose npm v6.14.7
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build: vue-cli-service build
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@ngtlin
Copy link
Author

ngtlin commented Aug 25, 2020

It is worth of noting that the issue can be worked around by turning off 'parallel' build in vue.config.js.

@maikelvl
Copy link

@ngtlin Het is inderdaad niets waard 😉

The reproduction link isn't public.

Please note the latest @vue/cli version is 4.5.3.

@haoqunjiang
Copy link
Member

  1. The reproduction link returns a 404.
  2. symlinks are known to cause problems for ESLint in the webpack pipeline https://cli.vuejs.org/guide/troubleshooting.html#symbolic-links-in-node-modules
  3. The second build succeeded only because of the cache: No eslint warnings on initial "npm run serve"  #3065 (comment) It's a known bug in Vue CLI.

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

No branches or pull requests

3 participants