Subscribe on changes!

Some packages may didn't built after run build.js if the number of the cpus is less than the number of packages

avatar
Jul 20th 2021

Version

3.2.0-beta.2

Reproduction link

https://github.com/vuejs/vue-next

Steps to reproduce

  1. download the code of vue-next
  2. npm run build

What is expected?

Check packages, all packages which are not private or have build options have been built.

What is actually happening?

Check packages, some of them may didn't built if your number of the cpus is less than the number of packages. In my machine which has 12 cpus, package vue and package vue-compat was not built.


  1. The package sfc-playground could not be successfully build now.
  2. The build script will run the packages build in parallel(see also here) and the max concurrency is the number of cpu.
  3. Will stop add new task if any of the build tasks is failed.
  4. On my computer with 12 cpus, the vue and vue-compat are the last 2 build tasks of total 14 tasks. The failed build of sfc-playground stoped the build procedure, so the dists of vue and vue-compat are not generated.

Considering the sfc-playground package is built using vite with the script build-sfc-playground, I think we can simply remove the build of sfc-playground from build tasks by removing the buildOptions in packages/sfc-playground/package.json. And we can also catch the errors in build script to let the build procedure continue if any of the packages build failed.

avatar
Jul 20th 2021

Bailing on failed builds is by design - there should not be build errors so if it happens it needs to be fixed.