

When trying to compile an application running yarn build
you may encounter error Command failed with exit code 137
Exist code 137 means the build process ran out of memory. You will need to increase the amount of memory available or enable swap.
I encountered this specific error while trying to run yarn build inside my strapi application. For my particular situation, the machine had 2GB of memory but I was also running vscode remote which uses a lot of memory. I was able to disconnect vscode and rerun the build process.
Another approach is to enable swap. instruction for enabling a swap file (virtual memory) on a ubuntu linux server can be found here.
You can close this message & continue reading but...
β€οΈβ€οΈβ€οΈ Please consider visiting one of my sponsors first β€οΈβ€οΈβ€οΈ
Sign up and get a $200, 60-day credit to try DO.
Spend $25 after your credit expires and I will also get $25 in credit!
Hi Reader, I noticed that you are using an ad blocker while visiting my website. While I completely understand that excessive ads can hinder your browsing experience, ad revenue helps pay for the cost associated with operating this website.
jcutrer.com is a labor of love, created with the primary aim to provide you with quality content, free of cost. Itβs a space where I share information, ideas, and insights that I hope have a meaningful impact. However, maintaining and updating this platform incurs substantial costs.
Sincerely,
Jonathan