ChunkLoadError: Loading chunk node_modules_roots_bud-client_lib_hot_client_js failed

Hi.
Got a completly fresh bedrock sage 10 installation. Everything works fine untill i start yarn dev.
Then i get this error Message, how can i fix this?

Uncaught SyntaxError: Unexpected token '<' (at node_modules_roots_bud-client_lib_hot_client_js.chunk.js:1:1)
(index):1224 Uncaught (in promise) ChunkLoadError: Loading chunk node_modules_roots_bud-client_lib_hot_client_js failed.
(missing: example.test/app/themes/sage/public/js/dynamic/node_modules_roots_bud-client_lib_hot_client_js.chunk.js)
    at __webpack_require__.f.j ((index):1224:29)
    at (index):702:40
    at Array.reduce (<anonymous>)
    at __webpack_require__.e ((index):701:67)
    at fn.e ((index):880:50)
    at index.mjs:15:1
    at Generator.next (<anonymous>)
    at index.mjs:10:1
    at new Promise (<anonymous>)
    at __awaiter (index.mjs:6:1)

Thanks for helping me

Please read How to best ask questions on this forum

This post is lacking critical information such as:

  • All relevant details about your setup

    Operating systems, local/remote environment information, versions of the software that you’re using are all important details that should be provided when asking for help.

I’m having the exact same issue. Did you ever figure it out?

Welcome @theutz!

I’d bet that Unexpected token '<' is HTML trying to be loaded as JS. It’s likely a problem with your setup, and as such, we need info about what you’re running to help further. If you can provide that, I’m sure the community will be able to help.

Operating systems, local/remote environment information, versions of the software that you’re using are all important details that should be provided when asking for help.

Thanks, @talss89 ! I ended up blowing away my setup and starting fresh, and now the problem doesn’t seem to be there. So I don’t have much to give you. But, for posterity, I’ll describe as best I can:

I setup a new WordPress site using Laravel Valet to host my local dev on my MacBook Air. I’m running PHP 8.2, and I installed Acorn following the instructions. I ran yarn && yarn build (which I think might’ve been the issue), and then I ran yarn dev.

In my newest iteration, I didn’t run yarn build, and I don’t seem to have those problems anymore. It seems like it might have something to do with the hot reloading? Perhaps adding a yarn clean command or something might provide a quick fix.

Anyways, thanks for the quick reply!

1 Like

Its a complete fresh installation
im Using Valet with php 8.1. i tried it several times always with new installations of bedrock and sage. as soon as i’m doin yarn dev this error shows up.

What node version is used?

Hi @tkohlmann21,
am I right you renamed your theme-folder (from sage to whatever)?
Then you have to change the public-path in your bud.config.js:

.setPublicPath('/app/themes/WHATEVER/public/')

That should do the trick.

3 Likes