[qgis-qwc2] Problems getting the qwc2 app running since webpack 5

Sandro Mani manisandro at gmail.com
Tue Feb 1 06:04:24 PST 2022


Hi Daniel

A glance at the JS console and network inspector should give some 
pointers about what is going wrong - most likely in the network 
inspector you'll see that some requests are failing due to the requested 
file not existing on the server at the requested location, and you 
should also see where the files are expected to exist.

Hope this helps
Sandro

On 01.02.22 14:42, Daniel Cebulla wrote:
> Hello qwc2 community,
>
> I have running a qwc2-app based on the qwc2-demo-app, which is 
> included in a qwc-docker-stack to use the qwc services. Since now the 
> system uses an old version based on the qwc2-demo-app which uses 
> webpack 4 for compiling.
> Now I want to update the app based on a current release of the 
> demo-app, but I can't get it running.
>
> Starting the app itself with <npm install> and <npm start> works fine, 
> it shows me the app in the browser. The problem is to get it running 
> within the docker stack.
>
> Just to recap, this should be the same for everyone:
> Using <npm run prod> with webpack 4 the three files "QWC2App.js", 
> "webpack-dev-server.js" and "webpack.js" were compiled within the dist 
> folder. Now with webpack 5 it generates "QWC2App.js", "QWC2App.js.map" 
> and a license file.
>
> In addition the structure of the index.html file has changed. Before, 
> the qwc2 app was inclued in the body section of the html file with 
> this line:
> <script src="dist/QWC2App.js"></script>
>
> Now it is included in the head section with something like this:
> </script><script defer="defer" 
> src="dist/QWC2App.js?a619555e4c9b3e5b8e71"></script>
>
> My problem is that the docker stack does not load this "new" app 
> files. Building the docker stack, bringing the images up and 
> generating all of the config files within the qwc admin panel works 
> well. But loading the actual site, brings a blank page and not the 
> compiled app.
> It does not working either referencing the app in the body of the 
> index.html like it was before or in the header as it is generated now.
>
> Is there anyone with similar issues? Any idea what I am missing? Any 
> configs I have to set or something else?
>
> Thanks a lot for your help!
> Greetings,
> Daniel Cebulla
> _______________________________________________
> qgis-qwc2 mailing list
> qgis-qwc2 at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/qgis-qwc2


More information about the qgis-qwc2 mailing list