From daniel.cebulla at jena.de Tue Feb 1 05:42:26 2022 From: daniel.cebulla at jena.de (Daniel Cebulla) Date: Tue, 1 Feb 2022 14:42:26 +0100 Subject: [qgis-qwc2] Problems getting the qwc2 app running since webpack 5 Message-ID: <23fbefcb-b0ab-3c63-3764-0eacf7aa5324@jena.de> 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 and 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 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: Now it is included in the head section with something like this: 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 From manisandro at gmail.com Tue Feb 1 06:04:24 2022 From: manisandro at gmail.com (Sandro Mani) Date: Tue, 1 Feb 2022 15:04:24 +0100 Subject: [qgis-qwc2] Problems getting the qwc2 app running since webpack 5 In-Reply-To: <23fbefcb-b0ab-3c63-3764-0eacf7aa5324@jena.de> References: <23fbefcb-b0ab-3c63-3764-0eacf7aa5324@jena.de> Message-ID: <8b3d78d3-218d-322a-019c-ec591ff6f8f9@gmail.com> 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 and 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 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: > > > Now it is included in the head section with something like this: > > > 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 From michael.haelsig at online.de Wed Feb 9 08:36:16 2022 From: michael.haelsig at online.de (=?ISO-8859-1?Q?Dr=2E_Michael_H=E4lsig?=) Date: Wed, 09 Feb 2022 17:36:16 +0100 Subject: [qgis-qwc2] Breaking Changes after 'yarn install' Message-ID: <1813666.ncrQlxPZlr@debian11> Hi, when I run 'yarn install' before compilation of my project, I get the following error messages during compilation of the local version: ERROR in ./qwc2/stores/StandardStore.js 26:0-22 Module not found: Error: Can't resolve 'url' in '/home/mhaelsig/QGIS/ QGIS_Server/qwc2-app-mhc9/qwc2/stores' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }' - install 'url' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "url": false } @ ./qwc2/components/StandardApp.jsx 57:0-52 332:4-22 333:19-36 @ ./js/app.jsx 10:0-54 13:50-61 ERROR in ./qwc2/utils/ConfigUtils.js 18:0-22 ... ERROR in ./qwc2/utils/LayerUtils.js 31:0-22 ... ERROR in ./qwc2/utils/PermaLinkUtils.js 20:0-22 ... ERROR in ./qwc2/components/PluginsContainer.jsx 38:0-22 ... ERROR in ./qwc2/plugins/Authentication.jsx 35:0-22 ... If I restore 'node-modules' and yarn.lock from backup and avoid 'yarn install', I can compile. What do I have to update to avoid these error messages? Thank you. -- Dr. Michael H?lsig Diefenbachstr. 9 81479 M?nchen Tel.: +49 89 79199563 Mob.:+49 171 333 7558