-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
I tried to run the tool on a Java project and, unfortunately, the AST generation fails with
$ genese cpx -l java ./src
Welcome to @genese cli
✖ AST generation
/home/skytreader/.nvm/versions/node/v16.7.0/lib/node_modules/@genese/complexity/node_modules/@genese/core/dist/index.js:2
export * from './utils/primitives/arrays.util';
^^^^^^
SyntaxError: Unexpected token 'export'
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1031:15)
at Module._compile (node:internal/modules/cjs/loader:1065:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object.<anonymous> (/home/skytreader/.nvm/versions/node/v16.7.0/lib/node_modules/@genese/complexity/dist/src/languages-to-json-ast/java/cstToAstCases/primary.js:5:16)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
I tried to add "type": "module" in /home/skytreader/.nvm/versions/node/v16.7.0/lib/node_modules/@genese/complexity/package.json as suggested here but to no avail. I also tried to install and run it with node v12.22.12 with pretty much the same result.
How can I run this on a Java project? Works fantastic for Typescript, btw. :)
EDIT (May 28 2022): The full path of primary.js in the stack trace was indicating the home directory of the wrong Linux user. Edited it for clarity. (Text replacement macro to blame.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels