WSL crashes when running Meshery UI dev environment (make ui / make ui-build)

I’m currently working on the Sistent component in the Meshery UI and trying to test my changes locally. However, when I start the development environment, WSL crashes during the build process.

Environment

  • OS: Windows with WSL (Ubuntu)

  • Project: Meshery

Steps to Reproduce

  1. Navigate to the Meshery repository

  2. Run the make ui command

What Happens

The UI starts compiling and Babel logs many messages like:

[BABEL] Note: The code generator has deoptimised the styling … as it exceeds the max of 500KB

After compilation completes:

compiled client and server successfully in 529.4s (61789 modules)
Ready on http://localhost:3000
wait - compiling / (client and server)...

At this point:

  • VS Code shows the error:
Cannot connect. Please reload the window.

The WSL environment becomes unstable / crashes, and the development server stops responding.

I also tried:

  • Increasing Node.js max memory (--max-old-space-size)

  • Increasing WSL memory limits

but the issue still occurs.

Screenshot

Error shown in VS Code:

Is this a known issue with Meshery UI builds on WSL?

Any suggestions on debugging or stabilizing the dev environment would be helpful.

I suggest increasing the swap (virtual RAM). Regarding Babel, it does take some time to process. We should consider migrating from Babel to SWC

@saurabhraghuvansii Might offer some help here

@KhushamBansal your system Ram?

My PC has 16GB of RAM.

It looks like this might be a heap memory issue. If you did a full clone try doing a shallow one or use the codespaces on github and use the 16gb machine

So you have 16 GB ram using wsl means technically you’re using 8gib for wsl.

One solution is to increase wsl ram to 12gib

Other is switch to linux completely.

I tried increasing WSL RAM to 12GB and virtual RAM to 8GB, but it still fails. Also, I can’t use codespace on github as I want to import local sistent repo for testing the changes in the UI components. I’ll switch to Linux completely. Thankyou everyone for the suggestions!

I switched to Linux and it worked!

2 Likes