Can't `expo publish`, "socket hang up"

Hi, the socket hang up error during building JavaScript bundle could be a symptom of the Metro bundler process crashing for some reason (e.g. running out of memory: Error when running exp publish: socket hang up). The problem is that in this case there’s no stderr output from Metro before the socket hangup, so it’s pretty hard to say what’s causing this.

Since Node.js running out of heap space can sometimes cause this, could you try instead of expo publish use this command which sets a larger heap space for the Node process?

node --max-old-space-size=8192 $(which expo) publish --max-workers 1 --non-interactive [...]

Maybe this will help us rule out if it’s memory usage or something else.