roots / sage

WordPress starter theme with Laravel Blade components and templates, Tailwind CSS, and a modern development workflow
https://roots.io/sage/
MIT License
12.77k stars 3.06k forks source link

Issue with Hot reload #3195

Closed PetteriSeoka closed 2 months ago

PetteriSeoka commented 2 months ago

Version

Latest

What did you expect to happen?

For JS files in scripts/components to load when firing command "npm run start".

What actually happens?

Files do not get loaded. Everything works though with "npm build:production"

Steps to reproduce

Fresh install. Removed the paid plugins.

System info

WSL2 Ubuntu Node version 18.18.0.

Log output

app.js:13 Failed to load toggle-button component: Error: Problem communicating active modules to the server: undefined undefined:undefined:undefined undefined
    at eval (lazy-compilation-web.js:31:6)
    at Set.forEach (<anonymous>)
    at activeEventSource.onerror (lazy-compilation-web.js:29:18)
eval @ app.js:13
Promise.catch
eval @ app.js:12
./scripts/app.js @ app.js?v=51d575:613
options.factory @ (index):3642
__webpack_require__ @ (index):3020
__webpack_exec__ @ app.js?v=51d575:627
(anonymous) @ app.js?v=51d575:628
webpackJsonpCallback @ (index):4358
(anonymous) @ app.js?v=51d575:9Understand this error
localhost/:4386 

       GET https://localhost:42087/lazy-compilation-using-javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/toggle-button.js@javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/carousel/index.js net::ERR_TIMED_OUTUnderstand this error
lazy-compilation-web.js:31 Uncaught (in promise) Error: Problem communicating active modules to the server: undefined undefined:undefined:undefined undefined
    at eval (lazy-compilation-web.js:31:6)
    at Set.forEach (<anonymous>)
    at activeEventSource.onerror (lazy-compilation-web.js:29:18)
eval @ lazy-compilation-web.js:31
activeEventSource.onerror @ lazy-compilation-web.js:29
error
updateEventSource @ lazy-compilation-web.js:28
exports.keepAlive @ lazy-compilation-web.js:64
eval @ index.js:10
./scripts/components/carousel/index.js!lazy-compilation-proxy @ 4296.js?v=c3afb7:22
options.factory @ (index):3642
__webpack_require__ @ (index):3020
fn @ (index):3300
__webpack_require__.t @ (index):3095
Promise.then
eval @ app.js:25
setTimeout
ready @ utils.js:17
eval @ app.js:23
./scripts/app.js @ app.js?v=51d575:613
options.factory @ (index):3642
__webpack_require__ @ (index):3020
__webpack_exec__ @ app.js?v=51d575:627
(anonymous) @ app.js?v=51d575:628
webpackJsonpCallback @ (index):4358
(anonymous) @ app.js?v=51d575:9Understand this error
:42087/lazy-compilation-using-javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/toggle-button.js@javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/carousel/index.js:1 

       GET https://localhost:42087/lazy-compilation-using-javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/toggle-button.js@javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/carousel/index.js net::ERR_TIMED_OUTUnderstand this error
:42087/lazy-compilation-using-javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/toggle-button.js@javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/carousel/index.js:1 

       GET https://localhost:42087/lazy-compilation-using-javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/toggle-button.js@javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/carousel/index.js net::ERR_TIMED_OUTUnderstand this error
:42087/lazy-compilation-using-javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/toggle-button.js@javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/carousel/index.js:1 

       GET https://localhost:42087/lazy-compilation-using-javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/toggle-button.js@javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/carousel/index.js net::ERR_TIMED_OUTUnderstand this error
:42087/lazy-compilation-using-javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/toggle-button.js@javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/carousel/index.js:1 

       GET https://localhost:42087/lazy-compilation-using-javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/toggle-button.js@javascript/esm%7C/home/petteri/dev/gdsbedrock/node_modules/swc-loader/src/index.js%3F%3Fswc!/home/petteri/dev/gdsbedrock/node_modules/_roots/wordpress-hmr/lib/loader.cjs%3F%3F_roots/wordpress-hmr/loader!/home/petteri/dev/gdsbedrock/web/app/themes/gds/resources/scripts/components/carousel/index.js net::ERR_TIMED_OUT

Please confirm this isn't a support request.

Yes

retlehs commented 2 months ago

Steps to reproduce Fresh install

toggle-button resources/scripts/components/carousel/index.js

This doesn't sound like a fresh install at all.

You'll have to head over to https://discourse.roots.io/ for further support. Make sure to read how to best ask questions on our forum, and figure out the minimal reproduction steps needed