I'm getting an error when I try to rebuild the "web-app" web interface according to the instructions from
$ node --version
v22.20.0
$ npm --version
11.6.1
$ npm install
npm warn deprecated infl...@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated rim...@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated gl...@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting
i...@izs.me.... many more warnings ...
$ npm run build
> swup...@0.2.0 build
> gulp build
Error [ERR_REQUIRE_ASYNC_MODULE]: require() cannot be used on an ESM graph with top-level await. Use import() instead. To see where the top-level await comes from, use --experimental-print-required-tla.
From /home/stm/src/swupdate/web-app/node_modules/gulp-cli/lib/shared/require-or-import.js
Requiring /home/stm/src/swupdate/web-app/gulpfile.mjs
at ModuleJobSync.runSync (node:internal/modules/esm/module_job:454:13)
at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:435:47)
at loadESMFromCJS (node:internal/modules/cjs/loader:1537:24)
at Module._compile (node:internal/modules/cjs/loader:1688:5)
at Object..js (node:internal/modules/cjs/loader:1839:10)
at Module.load (node:internal/modules/cjs/loader:1441:32)
at Function._load (node:internal/modules/cjs/loader:1263:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
at Module.require (node:internal/modules/cjs/loader:1463:12) {
code: 'ERR_REQUIRE_ASYNC_MODULE'
}
I tried that with swupdate release 2025.12 as well as with the current HEAD revision. The documentation says "
Node.js version 18 or greater", so my Node.js version should be ok. Is that a known problem?