[qgis-qwc2] Breaking Changes after 'yarn install'

Dr. Michael Hälsig michael.haelsig at online.de
Wed Feb 9 08:36:16 PST 2022


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




More information about the qgis-qwc2 mailing list