Yarn Build slow Windows 10 WSL

Hello There,

First of all congratulations on the release of Sage 10. I decided to give it a go, however I run into a few issues.

I use Local by Flywheel for all my websites. WSL 2 is installed.

When I try and run yarn dev (in WSL) the console says the webserver is live, however I can’t seem to connect to it. Maybe this has something to do with the way containers work in Local?

The other problem I ran into is that yarn build does work, but it is very slow. A simple added CSS rule took 70 seconds to build. I’ve recently build a new PC with plenty of resources, so that shouldn’t be the problem. Is there anything I can do to speed this up?

@Leon_Gotje
When I try and run yarn dev (in WSL) the console says the webserver is live, however I can’t seem to connect to it. Maybe this has something to do with the way containers work in Local?
Yes, new container need to config it.

The other problem I ran into is that yarn build does work, but it is very slow. A simple added CSS rule took 70 seconds to build. I’ve recently build a new PC with plenty of resources, so that shouldn’t be the problem. Is there anything I can do to speed this up?
ans:
Can you please clear cache

I’m having a similar issue on a PC running WSL 2, and Debian wiht Local by Flywheel also on Debian. I can’t seem to get any response when using Yarn Dev. I get error messages Similar to this when I run yarn dev.

user@machine:~/Local Sites//CBCtheme$ yarn dev
[bud@6.4.5] [sage] › ⚠  warning   None of the requested ports could be resolved. 
 A port was automatically selected: 36465 

I’ve seen several posts about changing proxy URLs in bud.config.mjs fileto http://0.0.0.0:3000 as well as turning off https. I was never running https, but still can’t get any sort of live reload working.

This is my current Bud config

/**
     * Proxy origin (`WP_HOME`)
     */
    .proxy("http://localhost")

    /**
     * Development origin
     */
    .serve("http://localhost:10005/")

Any help would be appreciated.

I also use WSL 2 for development and I put all the source code into the Linux file system (as ~/src/), and this solved all performance issues, as crossing file system boundaries hurts I/O at most.

Hi Strarsis,

Are you able to explain how to achieve this?

Kinds regards,
Mathijs

I installed WSL 2 Ubuntu on Windows 10.

I also have a privately hosted GitLab instance for hosting the source code - but you can use something else, e.g. a local git repository or a private GitHub repository (now free).
Then you have the code on ~/src in your WSL 2 instance and from time to time you commit your changes and then push the code to the remote git repository, e.g. on GitLab or GitHub.

You can edit these files using your favorite editor or IDE in Windows - or in Ubuntu (if you want that).
VSCode has excellent integration with WSL 2, so you can easily work on the code from your native Windows GUI.

Additionally Docker Desktop works nicely for running Docker container inside the WSL 2 system, with the code mounted into it for testing.

Edit: Also using PHP 8 instead of PHP 7 improved performance for me dramatically on WSL 2.

1 Like

Doesn’t the proxy url need to be the canonical url found in development/Wordpress_sites.yaml? That was my impression when reading through the docs/