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:
I tried other versions of node, npm, yarn but got the same results.
Switching to t2.medium instance type fixed the issue