'Turn a gedcom file in a json one to create a visualisation 3DJS

I'm trying to transform a gedcom file in json this the following code:

"Installation: The gedcom package can be added as a dependency to use in your code, or if you'd like to just use the CLI, install it globallly:

npm install -g gedcom"

and please find below the error:

Error: Illegal nesting: transition from 1 to NaN
    at /usr/local/lib/node_modules/gedcom/dist/cli.js:2:6625
    at e (/usr/local/lib/node_modules/gedcom/dist/cli.js:2:6769)
    at /usr/local/lib/node_modules/gedcom/dist/cli.js:2:7434
    at Object.<anonymous> (/usr/local/lib/node_modules/gedcom/dist/cli.js:2:7535)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47```

Thank you for your help.
Adrien 


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source