parcel: build freeze on 1.9.2

🐛 bug report

build freeze (as reported in https://github.com/parcel-bundler/parcel/issues/1537) still happens, luckily not as often (at least on Heroku) as it was before and there are some errors being thrown

⏳  Building assign.js...
(node:31252) UnhandledPromiseRejectionWarning: Error: socket hang up
    at createHangUpError (_http_client.js:313:15)
    at Socket.socketOnEnd (_http_client.js:416:23)
    at Socket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1081:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:31252) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:31252) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:31218) UnhandledPromiseRejectionWarning: Error: socket hang up
    at createHangUpError (_http_client.js:313:15)
    at Socket.socketOnEnd (_http_client.js:416:23)
    at Socket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1081:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:31218) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:31218) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:31218) UnhandledPromiseRejectionWarning: Error: socket hang up
    at createHangUpError (_http_client.js:313:15)
    at Socket.socketOnEnd (_http_client.js:416:23)
    at Socket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1081:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:31218) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)

nothing happens after that, build process still gets stuck as before.

🌍 Your Environment

Software Version(s)
Parcel 1.9.2
Node 10.1.0
npm/Yarn 6.1.0
Operating System Linux 4.16.13-1-ARCH

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

I personnaly still have the freezing issue…

Windows 10 Parcel v1.9.7 (tried different versions, no results) Node v8.11.3 npm v6.0.0 yarn v1.7.0

I tried to set variable env PARCEL_MAX_CONCURRENT_CALLS and/or PARCEL_WORKERS to different values, no success. (with and without no cache, no hmr etc) It’s on a vue project, with node-sass too.

I can successfully start the dev (not the build) if I comment most of my includes, then it’s building successfully, and I can put them back one by one until I got everything working.

I have a dual boot with a linux (based on ubuntu) and I have the exact same problem. The env is the same except for the node version. So I don’t think it’s an OS issue.

Should I create a new issue ?

I also continued to have freeze issues and traced the problem to WorkerFarm.js.

There’s an option called warmWorkers that is hard-coded to true inside WorkerFarm.js. My build no longer freezes after I set it to false. I have not had the time to investigate why.

I ended up adding the following line to package.json postinstall script so set warmWorkers to false every time I install parcel: sed -i 's/warmWorkers: true/warmWorkers: false/' ./node_modules/parcel-bundler/src/workerfarm/WorkerFarm.js

Update: my issue seems similar to #1836 and can be reproduced by trying to bundle only html+sass files. So I’ve made a comment there.

@Hammster Tbh in environments like heroku parcel probably only gets 1 thread, so it should probably not even start using a worker. But the overload issue is a known issue, see #1587 and #1595