Closed dumistoklus closed 5 years ago
Does it work when numWorkers
is not set?
This is the default value. Is it lying?
import os from 'os';
os.cpus().length - 1
Does it work when numWorkers is not set?
no
This is the default value. Is it lying?
import os from 'os'; os.cpus().length - 1
I think it's a problem place. What happens when I have only one CPU?
@TrySound well?
It's jest bug. Fixed in master. For now you may specify numWorkers
explicitly
Math.max(1, os.cpus().length - 1)
So the following workaround fixes this issue.
uglify({ numWorkers: 1 })
I think it's kinda critical, because it doesn't print any error and just silently fails to generate output.
@utatti You may use rollup-plugin-terser
. Terser is less buggy than uglify.
Guys, I upgraded jest-worker to version which sets minimal numWorkers to 1. You may remove that option now.
I still recommend to migrate to terser.
I tried to build my code on dev machine Windows - it works fine.
Then I tried to build code on VM (VirtualBox) with Ubuntu 16.04 and 18.04 build was stop without any error. Building was stopped on step "./js/article.ts → ./www/build/article.js..."
Step by step I found a heart of bug - "numWorkers". If I set numWorkers to "1" then building work fine. otherwise, stop without error.