Skip to content

Build broken: Switch from require to dynamic import

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /usr/src/app/node_modules/uuid/dist-node/index.js from /usr/src/app/server.js not supported.
Instead change the require of index.js in /usr/src/app/server.js to a dynamic import() which is available in all CommonJS modules.
    at /usr/src/app/server.js:10:26 {
  code: 'ERR_REQUIRE_ESM'
}

Node.js v18.20.8