Skip to content

ERR_REQUIRE_ESM #1682

Open
Open

Description

@f4eru

Hello,

starting ungit 1.5.30+4d147daa via command line gives an error:


$ ungit
node:internal/modules/cjs/loader:1194
    throw new ERR_REQUIRE_ESM(filename, true);
    ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /usr/local/lib/node_modules/ungit/node_modules/yargs/index.mjs not supported.
Instead change the require of /usr/local/lib/node_modules/ungit/node_modules/yargs/index.mjs to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/usr/local/lib/node_modules/ungit/source/config.js:7:15)
    at Object.<anonymous> (/usr/local/lib/node_modules/ungit/bin/ungit:5:16) {
  code: 'ERR_REQUIRE_ESM'
}

Node.js v18.19.1
$

Activity

  1. DaveChild commented on Aug 31, 2026

    @DaveChild

    I don't know if this will help you, but I had the same error - I was running an old version of node (also v18.*). Upgraded to a recent version, and all worked normally.

  2. f4eru commented on Sep 1, 2026

    @f4eru
    Author

    Yes it seems linuxmint is supplied by default with those older libs.
    Thanks, updated that, it works.

    how to force the install of the latest version :
    sudo apt install npm nodejs
    sudo npm -g install n
    sudo n install latest
    sudo npm install -g npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions