Skip to content

Error on running in Node.js v20.11.0 #70

@psilogroup

Description

@psilogroup

Hello in getting this error when running the command
genese cpx -l js .\src\


Welcome to @genese cli
C:\Users\gabriel\AppData\Roaming\npm\node_modules@genese\complexity\dist\src\languages-to-json-ast\java\services\ast-file-generation-java.service.js:5const java_parser_1 = require("java-parser");
^

Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\gabriel\AppData\Roaming\npm\node_modules@genese\complexity\node_modules\java-parser\src\index.js from C:\Users\gabriel\AppData\Roaming\npm\node_modules@genese\complexity\dist\src\languages-to-json-ast\java\services\ast-file-generation-java.service.js not supported.
Instead change the require of index.js in C:\Users\gabriel\AppData\Roaming\npm\node_modules@genese\complexity\dist\src\languages-to-json-ast\java\services\ast-file-generation-java.service.js to a dynamic import() which is available in all CommonJS modules.
at Object. (C:\Users\gabriel\AppData\Roaming\npm\node_modules@genese\complexity\dist\src\languages-to-json-ast\java\services\ast-file-generation-java.service.js:5:23) {
code: 'ERR_REQUIRE_ESM'
}

Node.js v20.11.0

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