[Debian-iot-maintainers] Bug#1011519: glewlwyd: ftbfs with webpack 5 - Module not found: Error: Can't resolve 'i18next-http-backend'

Pirate Praveen praveen at onenetbeyond.org
Tue May 24 12:28:11 BST 2022


Package: glewlwyd
Version: 2.7.0-2
Severity: serious
Justification: ftbfs
Tags: ftbfs
User:pkg-javascript-devel at alioth-lists.debian.net
Usertags: webpack5

With webpack 5 your package ftbfs with error.

ERROR in ./src/admin.js 13:0-43
Module not found: Error: Can't resolve 'i18next-http-backend' in 
'/<<PKGBUILDDIR>>/webapp-src/src'

ERROR in ./src/callback.js 26:0-43
Module not found: Error: Can't resolve 'i18next-http-backend' in 
'/<<PKGBUILDDIR>>/webapp-src/src'

ERROR in ./src/login.js 14:0-43
Module not found: Error: Can't resolve 'i18next-http-backend' in 
'/<<PKGBUILDDIR>>/webapp-src/src'

ERROR in ./src/profile.js 14:0-43
Module not found: Error: Can't resolve 'i18next-http-backend' in 
'/<<PKGBUILDDIR>>/webapp-src/src'

4 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

A better way to tell webpack to look for node modules installed in 
/usr/share/nodejs is adding the following to webpack.config.js

  resolve: {
    modules: ['/usr/share/nodejs', '/usr/lib/nodejs'],
  },
  resolveLoader: {
    modules: ['/usr/share/nodejs','/usr/lib/nodejs'],
  },

See 
https://salsa.debian.org/js-team/node-clipboard/-/blob/master/debian/patches/use-system-libs.patch 
as an example.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: glewlwyd.log
Type: text/x-log
Size: 142900 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-iot-maintainers/attachments/20220524/cd08f117/attachment-0001.bin>


More information about the Debian-iot-maintainers mailing list