Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using typedoc option 'disableSources' results runtime error: Cannot read property '0' of undefined #507

Closed
rlubke opened this issue Aug 14, 2020 · 2 comments

Comments

@rlubke
Copy link

rlubke commented Aug 14, 2020

Per the summary.

<@coherence-js-client>-<⎇ master>-<±>-1-> npx typedoc
Loaded plugin /Users/rlubke/files/gitlab/coherence-js-client/node_modules/typedoc-plugin-external-module-name

Using TypeScript 3.9.7 from /Users/rlubke/files/gitlab/coherence-js-client/node_modules/typescript/lib
Cannot read property '0' of undefined

typedoc.json is as follows:

{
  "inputFiles": [
    "./src"
  ],
  "out": "docs",
  "excludeNotExported": true,
  "excludePrivate": true,
  "module": "commonjs",
  "target": "ES6",
  "includeVersion": true,
  "readme": "README.md",
  "hideGenerator": true,
  "disableSources": true,
  "includeDeclarations": true,
  "excludeExternals": true,
  "stripInternal": true,
  "exclude": [
    "**/*+(index|package-internal).ts"
  ],
}

Using version 4.0.3 of the plugin and typedoc 0.17.8.

Removing the option results in a successful documentation run.

@rlubke rlubke closed this as completed Aug 21, 2020
@artemjackson
Copy link

Still actual
typedoc@0.17.8
typedoc-plugin-external-module-name@4.0.3

@rlubke why the issue was closed?

@andrewcell
Copy link

andrewcell commented Sep 9, 2020

After disableSources enable,

const filename = reflection.sources[0].originalName;

reflection does not have sources anymore, caused the error.

After I changed to

const filename = reflection.originalName;

it works with disableSources. (at least works with my source codes)

I thought there is a reason to get filename like that way so I changing that code after every npm install.
Hope to fix it soon. :O

christopherthielen added a commit that referenced this issue Dec 20, 2020
…turns off automatic module name feature)

Fixes #507
christopherthielen added a commit that referenced this issue Dec 20, 2020
…turns off automatic module name feature)

Fixes #507
christopherthielen added a commit that referenced this issue Dec 20, 2020
…turns off automatic module name feature)

Fixes #507
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants