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

TypeDoc failing with Cannot read property 'kindOf' of undefined #1489

Closed
dbartholomae opened this issue Jan 30, 2021 · 3 comments
Closed

TypeDoc failing with Cannot read property 'kindOf' of undefined #1489

dbartholomae opened this issue Jan 30, 2021 · 3 comments
Labels
bug Functionality does not match expectation

Comments

@dbartholomae
Copy link

Search terms

kindOf

Expected Behavior

Building documentation should work.

Actual Behavior

It fails:

> typedoc && touch docs/.nojekyll

Info: Loaded plugin typedoc-plugin-param-names
Info: Loaded plugin typedoc-plugin-sourcefile-url
TypeDoc exiting with unexpected error:
TypeError: Cannot read property 'kindOf' of undefined
    at /home/daniel/repos/jsx-md/node_modules/.pnpm/typedoc@0.20.16_typescript@4.0.2/node_modules/typedoc/dist/lib/converter/plugins/CommentPlugin.js:180:40
    at Array.filter (<anonymous>)
    at CommentPlugin.onBeginResolve (/home/daniel/repos/jsx-md/node_modules/.pnpm/typedoc@0.20.16_typescript@4.0.2/node_modules/typedoc/dist/lib/converter/plugins/CommentPlugin.js:180:14)
    at triggerEvents (/home/daniel/repos/jsx-md/node_modules/.pnpm/typedoc@0.20.16_typescript@4.0.2/node_modules/typedoc/dist/lib/utils/events.js:173:43)
    at triggerApi (/home/daniel/repos/jsx-md/node_modules/.pnpm/typedoc@0.20.16_typescript@4.0.2/node_modules/typedoc/dist/lib/utils/events.js:149:13)
    at eventsApi (/home/daniel/repos/jsx-md/node_modules/.pnpm/typedoc@0.20.16_typescript@4.0.2/node_modules/typedoc/dist/lib/utils/events.js:42:18)
    at Converter.trigger (/home/daniel/repos/jsx-md/node_modules/.pnpm/typedoc@0.20.16_typescript@4.0.2/node_modules/typedoc/dist/lib/utils/events.js:371:13)
    at Converter.resolve (/home/daniel/repos/jsx-md/node_modules/.pnpm/typedoc@0.20.16_typescript@4.0.2/node_modules/typedoc/dist/lib/converter/converter.js:197:14)
    at Converter.convert (/home/daniel/repos/jsx-md/node_modules/.pnpm/typedoc@0.20.16_typescript@4.0.2/node_modules/typedoc/dist/lib/converter/converter.js:44:14)
    at Application.convert (/home/daniel/repos/jsx-md/node_modules/.pnpm/typedoc@0.20.16_typescript@4.0.2/node_modules/typedoc/dist/lib/application.js:151:31)
 ERROR  Command failed with exit code 5.

Process finished with exit code 1

Steps to reproduce the bug

Issue is reproduced here:
https://github.com/dbartholomae/jsx-md/tree/demonstrate_typedoc_issue

It falis in 0.20.16, but 0.20.15 is still fine, so the regression happened in one of the following two commits:
d746d85
685ca41

Environment

  • Typedoc version: 0.20.16
  • TypeScript version: 4.0.2
  • Node.js version: 12.19.0
  • OS: WSL Ubuntu on Windows 10
@dbartholomae dbartholomae added the bug Functionality does not match expectation label Jan 30, 2021
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 31, 2021

Well that was a confusing one!

This broke because of 685ca41. The comment plugin assumed that all reflections removed via a comment had a parent, which is not necessarily true since that commit allowed the root ProjectReflection to have a comment.

v0.20.20 will fix this, but you'll need to remove the @internal comment from src/index.ts to get docs to show up as expected.

@dbartholomae
Copy link
Author

I've updated to v0.20.20 without removing the comment, and the documentation seems to be fine: https://dbartholomae.github.io/jsx-md/

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Feb 3, 2021

Well... color me confused. Those docs like they were built with typedoc src instead of typedoc src/index.ts, I guess that works if you prefer displaying all the modules instead of just the exported functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

No branches or pull requests

2 participants