Skip to content
This repository was archived by the owner on Aug 9, 2021. It is now read-only.
This repository was archived by the owner on Aug 9, 2021. It is now read-only.

Getting error "TypeError: Cannot read property 'items' of undefined" #63

@hdi-amiri

Description

@hdi-amiri

I am using this library with TypeDoc 0.20.26, I get the json output by setting "json": "json-doc" inside my tsconfig.json file and output is generated. But when I want to use it by entering following command to get the yaml output, I get the error that follows:

type2docfx json-doc.json yaml-dir

$ type2docfx json-doc.json .                                                                            
Warning: nothing genereatd.
Yaml dump start.
Yaml dump end.
Package index generated.
C:\Users\User1\AppData\Roaming\npm\node_modules\type2docfx\dist\main.js:126
var toc = tocGenerator_1.generateTOC(rootElementsForTOC, flattenElements[0].items[0].package);
                                                                            ^

TypeError: Cannot read property 'items' of undefined
    at Object.<anonymous> (C:\Users\User1\AppData\Roaming\npm\node_modules\type2docfx\dist\main.js:126:77)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47

type2docfx version: v0.11.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions