This has caused me several days of exciting times… some of the errors Webpack gives can be a little misleading, showing one error when there’s in-fact a totally different underlying issue which will fix everything!
The following shows you everything you need;
<./node_modules/.bin/encore (or your command here> --watch --progress --display-error-details --verbose
You’ll need to replace the start of this command with something relevant to you, depending on the location of your encore / webpack executable.