Tag Archives: Cloud

discourse

Fixing Yarn ESOCKETTIMEDOUT Error During Discourse Setup

While installing Discourse on a free tier instance in a Google Cloud Compute Instance, I was following this discourse install tutorial with only minor adjustments:

  • Used Ubuntu 20.04 LTS minimal
  • Standard Disk (default is Balanced)
  • e2.micro instance

However, when I was waiting for Step 9 to complete (after running ./discourse-setup) and everything being built, it would fail with an ESOCKETTIMEDOUT error related to yarn. The last message that tries to run is [ ! -d 'node_modules' ] || su discourse -c 'yarn install --production && yarn cache clean'.

Here’s what is going wrong. Yarn has a default timeout that is fine if you are using the minimum recommended for Discourse, but with a micro instance, it takes too long. To fix this, you have to manually edit one of the install scripts that runs for the new Docker container Discourse is building.
Continue reading