Skip to content

--reqJs error #59

@Regala

Description

@Regala

Hi! I'm getting this error trying to run the command with --reqJs:

callgraph

fisher@Fishers-MBP js-callgraph % js-callgraph --output test.json --reqJs --cg input-scripts/simple-scripts/functioncall-arithmetic.js
/usr/local/lib/node_modules/@persper/js-callgraph/src/requireJsGraph.js:18
        var partialFileName = regexParse[2]  + ".js",
                                        ^

TypeError: Cannot read property '2' of null
    at Object.makeRequireJsGraph (/usr/local/lib/node_modules/@persper/js-callgraph/src/requireJsGraph.js:18:41)
    at Object.build (/usr/local/lib/node_modules/@persper/js-callgraph/src/runner.js:167:28)
    at Object.<anonymous> (/usr/local/lib/node_modules/@persper/js-callgraph/js-callgraph.js:117:5)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Function.Module._load (node:internal/modules/cjs/loader:828:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47`

Any idea on what's wrong?

fisher@Fishers-MBP js-callgraph % node -v
v16.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions