Category: javascript

yarn build error “Command failed with exit code 137”

yarn build error “Command failed with exit code 137”

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.

Ads Blocker Image Powered by Code Help Pro

πŸ™πŸ™A Humble Request to Disable AdBlock πŸ™πŸ™

You can close this message & continue reading but...
❀️❀️❀️ Please consider visiting one of my sponsors first ❀️❀️❀️

DigitalOcean πŸš€

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!
DigitalOcean Referral Badge

Pictory πŸ€–

Create amazing videos using Pictorys AI powered software.
Its FREE to create your first 3 video projects
pictory


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