Home > Enterprise >  Yarn build consumes 100% CPU
Yarn build consumes 100% CPU

Time:09-18

I am using yarn to build several apps (mostly react-based) on the EC2 instance. During the build, the CPU usage goes up to 100% (sometimes even 135% somehow). As a result, the build process hangs forever until I kill it. At the same time, building the same apps on my local Macbook works like a charm.

My server setup is:

  • Instance type: t2.small
  • OS: Ubuntu 20.04.2
  • Node: v16.9.0
  • NPM: v7.23.0
  • Yarn: 1.22.5

I tried other versions of node, npm, yarn but got the same results.

CodePudding user response:

Switching to t2.medium instance type fixed the issue

  • Related