Error [ERR_REQUIRE_ASYNC_MODULE] when rebuilding web-app

22 views
Skip to first unread message

Stephan Mühlstrasser

unread,
Mar 27, 2026, 10:14:30 AM (5 days ago) Mar 27
to swupdate
Hi,

I'm getting an error when I try to rebuild the "web-app" web interface according to the instructions from https://sbabic.github.io/swupdate/mongoose.html#develop:
$ pwd
/home/stm/src/swupdate/web-app
$ 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?

Thanks
Stephan

Stefano Babic

unread,
Mar 27, 2026, 11:18:37 AM (5 days ago) Mar 27
to Stephan Mühlstrasser, swupdate
Hi Stephan,
Because I have a LTS version and I have node 18. And it works with this
version.

> so my Node.js version should be ok. Is that a known problem?

This seems a known compatibility break in node

Best regards,Stefano Babic

--
_______________________________________________________________________
Nabla Software Engineering GmbH
Hirschstr. 111A | 86156 Augsburg | Tel: +49 821 45592596
Geschäftsführer : Stefano Babic | HRB 40522 Augsburg
E-Mail: sba...@nabladev.com

--
_______________________________________________________________________
Nabla Software Engineering GmbH
Hirschstr. 111A | 86156 Augsburg | Tel: +49 821 45592596
Geschäftsführer : Stefano Babic | HRB 40522 Augsburg
E-Mail: sba...@nabladev.com

Stephan Mühlstrasser

unread,
Mar 27, 2026, 11:42:46 AM (5 days ago) Mar 27
to swupdate
Hi Stefano,

thanks for pointing out the compatibility problem in Node.js. I found the corresponding issues for gulpjs now, and I will use the workaround that was documented.

Best regards
Stephan

Reply all
Reply to author
Forward
0 new messages