Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

"Unexpected crash! Please log a bug" for dts-gen -m @orbitdb/core #188

Open
MichaelJCole opened this issue Nov 3, 2023 · 0 comments
Open

Comments

@MichaelJCole
Copy link

MichaelJCole commented Nov 3, 2023

> $ dts-gen -m @orbitdb/core                                 ⬡ 18.18.0 [±dev ✓]
Unexpected crash! Please log a bug with the commandline you specified.
/home/michael/.nvm/versions/node/v18.18.0/lib/node_modules/dts-gen/bin/lib/run.js:58
        result = guess.generateModuleDeclarationFile(args.module, require(args.module));
                                                                  ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/michael/causing-us/friend-server/node_modules/@orbitdb/core/src/index.js from /home/michael/.nvm/versions/node/v18.18.0/lib/node_modules/dts-gen/bin/lib/run.js not supported.
Instead change the require of index.js in /home/michael/.nvm/versions/node/v18.18.0/lib/node_modules/dts-gen/bin/lib/run.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/home/michael/.nvm/versions/node/v18.18.0/lib/node_modules/dts-gen/bin/lib/run.js:58:67) {
  code: 'ERR_REQUIRE_ESM'
}

Can require() be replaced with a dynamic import()?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant