Gerrit0 / typedoc-plugin-missing-exports

MIT License
44 stars 4 forks source link

AssertionError when building yarn monorepo #5

Closed MasterOdin closed 2 years ago

MasterOdin commented 2 years ago

Example repo: https://github.com/bishopcais/io/tree/typedoc-missing-exports (note, the branch is typedoc-missing-exports).

When running yarn docs within the root of that repo, I get the error:

yarn run v1.22.10
$ typedoc
Info: Loaded plugin typedoc-plugin-missing-exports
TypeDoc exiting with unexpected error:
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(parentSymbol)

    at isInherited (/Users/mpeveler/code/github/bishopcais/io/node_modules/typedoc/dist/lib/converter/symbols.js:531:5)
    at Object.convertProperty (/Users/mpeveler/code/github/bishopcais/io/node_modules/typedoc/dist/lib/converter/symbols.js:319:9)
    at convertSymbol (/Users/mpeveler/code/github/bishopcais/io/node_modules/typedoc/dist/lib/converter/symbols.js:120:88)
    at Converter.convertSymbol (/Users/mpeveler/code/github/bishopcais/io/node_modules/typedoc/dist/lib/converter/converter.js:45:37)
    at onResolveBegin (/Users/mpeveler/code/github/bishopcais/io/node_modules/typedoc-plugin-missing-exports/index.js:45:47)
    at triggerEvents (/Users/mpeveler/code/github/bishopcais/io/node_modules/typedoc/dist/lib/utils/events.js:191:43)
    at triggerApi (/Users/mpeveler/code/github/bishopcais/io/node_modules/typedoc/dist/lib/utils/events.js:167:13)
    at eventsApi (/Users/mpeveler/code/github/bishopcais/io/node_modules/typedoc/dist/lib/utils/events.js:60:18)
    at Converter.trigger (/Users/mpeveler/code/github/bishopcais/io/node_modules/typedoc/dist/lib/utils/events.js:389:13)
    at Converter.resolve (/Users/mpeveler/code/github/bishopcais/io/node_modules/typedoc/dist/lib/converter/converter.js:199:14) {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: undefined,
  expected: true,
  operator: '=='
}
error Command failed with exit code 6.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

This sounds like a similar error as #4, but opened a new issue as did not want to piggy back off it like I did in #3 in case they are different. Feel free to close as a duplicate though.

Gerrit0 commented 2 years ago

Wow, well tracking that one down was an adventure... This is crashing because of how Date is declared in @types/node version 12... it won't show up with @types/node v16

Gerrit0 commented 2 years ago

Shoot. That fix got the first crash, but there's another later on for presumably a similar reason.

Gerrit0 commented 2 years ago

Not really happy with the fix in bf41de315ab6e0ebbd429d5dacaaaa3881bc6a7c, but it works...

MasterOdin commented 2 years ago

Thanks for the fix! It has worked great for me so far.