Sorry for rehashing something previously discussed, I couldn’t post in the other closed threads.
My question is essentially the same as: https://discourse.roots.io/t/bud-build-error/21744
I even went through the same steps as @Al_Sherif_Ahmed_Khal
And receive the same error message.
ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
The solution was to use WSL? Which I’m totally unfamiliar with.
The short, WSL is a requirement of Bud for using the Sage asset build tools. So you have to setup your dev environment within WSL.
I left some links to resources there that should help, but you really do have to read up on what WSL is and how to set it up before anything else.
I saw someone did a fork to use Laravel Mix instead of Bud, which I think might work fine and not require WSL? So that could be an option, as it is a chore if you haven’t dealt with WSL before and gotten it configured.
I ultimately resigned myself to working on my Mac instead, as I didn’t want to spend more time to setup a local dev server within WSL. I normally just use Local by Flywheel, but ran into a conflict where Acorn’s WP CLI command wasn’t available. I’m not sure if this old issue on Github is related, but it was only happening to me on Windows and not macOS, and so that’s the point at which I gave up: If WP-CLI argument '--allow-root' is set, CLI isn't working · Issue #48 · roots/acorn · GitHub
After muddling through the WSL setup process and getting oh-so-close to it working but not quite, I very much appreciate you sharing your non-WSL-required version of Sage! I will be giving that a try as soon as I have some time Thank you!
Thanks @heyharvest, I appreciate all of the information, sorry that I also didn’t see your other reply in the other post. @patrickzach Thank you too, that video is great.
I’ll have a play around this evening and see if I can get everything going, if not I’ll give your laravel mix version a go.
I was in a similar situation, but it turned out not to be as complex as it sounds.
Installing WSL meant running the following from Power Shell. wsl --install
The only complication was that I had to enable Virtualisation within my BIOS.
I downloaded the Windows Terminal, which allowed me to easily login to my new Ubuntu setup.
I just selected Ubuntu from the drop down in the taskbar.
I changed to the theme directory with the ‘cd’ command.
The path is very similar to Windows, but the start changes slightly.
E.G. C:\ becomes /mnt/c/ and all other backslashes in the path, need replacing with forward slashes.
You can then start to run the commands detailed in the Installation docs…
‘nvm install --lts’
‘npm install --global yarn’
‘yarn’
‘yarn build’
Once the build process had taken place, I continued with my local development within the Windows environment, using Laragon.
@unicorn_in_training Apologies, if I under estimated the steps that you’d already tried.
I’ve since read the following and decided Laragon wasn’t a viable option…
" To take advantage of the improved speed, Microsoft recommends that you keep your project’s files inside of the Linux environment, and do most of your work there. Working with Windows files in Linux (or the other way around) can be much slower. That means that traditional Windows dev environments like Laragon or Local are out."
Source: Switching to Windows for Local WordPress Development