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

Getting "repo.getLineNumberAnchor is not a function" after typedoc update #220

Closed
mokone91 opened this issue Oct 26, 2022 · 16 comments
Closed
Labels
bug Something isn't working scope(plugin-pages)

Comments

@mokone91
Copy link

mokone91 commented Oct 26, 2022

Plugin

@knodes/typedoc-plugin-monorepo-readmes

Typedoc plugin(s) version(s)

^0.23.1

Typedoc version

0.23.18

Describe the problem


TypeDoc exiting with unexpected error:
TypeError: repo.getLineNumberAnchor is not a function
    at Object.createSourceReference (/Users/eldar/WebstormProjects/or-sdk-next/node_modules/.pnpm/@knodes+typedoc-pluginutils@0.23.1_typedoc@0.23.18/node_modules/@knodes/typedoc-pluginutils/dist/utils/reflection-source.js:49:32)
    at MonorepoReadmePlugin._modifyModuleIndexPage (/Users/eldar/WebstormProjects/or-sdk-next/node_modules/.pnpm/@knodes+typedoc-plugin-monorepo-readmes@0.23.1_typedoc@0.23.18/node_modules/@knodes/typedoc-plugin-monorepo-readmes/dist/plugin.js:61:68)
    at Renderer.<anonymous> (/Users/eldar/WebstormProjects/or-sdk-next/node_modules/.pnpm/@knodes+typedoc-plugin-monorepo-readmes@0.23.1_typedoc@0.23.18/node_modules/@knodes/typedoc-plugin-monorepo-readmes/dist/plugin.js:32:30)
    at triggerEvents (/Users/eldar/WebstormProjects/or-sdk-next/node_modules/.pnpm/typedoc@0.23.18_typescript@4.8.4/node_modules/typedoc/dist/lib/utils/events.js:191:43)
    at triggerApi (/Users/eldar/WebstormProjects/or-sdk-next/node_modules/.pnpm/typedoc@0.23.18_typescript@4.8.4/node_modules/typedoc/dist/lib/utils/events.js:167:13)
    at eventsApi (/Users/eldar/WebstormProjects/or-sdk-next/node_modules/.pnpm/typedoc@0.23.18_typescript@4.8.4/node_modules/typedoc/dist/lib/utils/events.js:60:18)
    at Renderer.trigger (/Users/eldar/WebstormProjects/or-sdk-next/node_modules/.pnpm/typedoc@0.23.18_typescript@4.8.4/node_modules/typedoc/dist/lib/utils/events.js:389:13)
    at Renderer.renderDocument (/Users/eldar/WebstormProjects/or-sdk-next/node_modules/.pnpm/typedoc@0.23.18_typescript@4.8.4/node_modules/typedoc/dist/lib/output/renderer.js:151:14)
    at /Users/eldar/WebstormProjects/or-sdk-next/node_modules/.pnpm/typedoc@0.23.18_typescript@4.8.4/node_modules/typedoc/dist/lib/output/renderer.js:135:22
    at Array.forEach (<anonymous>)

What did you expected ?

Expecting no errors

UPD:
typedoc@0.23.16 - still works
typedoc@0.23.17 - broken

@mokone91 mokone91 added bug Something isn't working triage labels Oct 26, 2022
@GerkinDev
Copy link
Member

Yes indeed. I saw this method was modified in their changelog.

@GerkinDev
Copy link
Member

Truth is, the next update is kind of stuck because I'm trying to preserve backward compatibility with the current version of the plugin, in order to follow semver notation for 0.x.x versions. And I would gain SO MUCH work time by dropping this version behavior entierly & focus only on the new behavior.

I was hoping typedoc would release a 0.24.0 version soon so that I can legitimately do breaking changes....

@mokone91
Copy link
Author

possible its not relevant after TypeStrong/typedoc#2065

@GerkinDev
Copy link
Member

The readme stuff will be dropped anyway, but other features are still relevant.

@mokone91
Copy link
Author

Im also use @knodes/typedoc-plugin-pages for adding changelog pages to packages, it works fine with latest typedoc

@mokone91
Copy link
Author

as this error related to '@knodes/typedoc-plugin-monorepo-readmes' plugin, but pugin feature included to typedoc already - I think this issue can be closed!
Thanks!

@souljorje
Copy link

@mokone91 hey! I also get this error right now and can't get why did you decide to close it?

@mokone91
Copy link
Author

Hi! because 'readmes' feature added to typdeoc core and this plugin can be disabled

@souljorje
Copy link

souljorje commented Dec 14, 2022

@mokone91 ah, found it here https://github.com/TypeStrong/typedoc/releases/tag/v0.23.16
thanks a lot!

@adrienboulle
Copy link

@mokone91 not sure to understand
The error comes from this file https://github.com/KnodesCommunity/typedoc-plugins/blob/main/packages/pluginutils/src/utils/reflection-source.ts#L48
function getLineNumberAnchor no longer exists but is used by this plugin

@souljorje
Copy link

@adrienboulle this plugin is not needed anymore, since it's functionality became native in jsdoc since this release TypeStrong/typedoc@v0.23.16 (release):

In packages mode, readme files will now be automatically included if present, TypeStrong/typedoc#2065.

@adrienboulle
Copy link

@souljorje @mokone91

The errors not only occurs in @knodes/plugin-monorepo-readmes but also in @knodes/typedoc-plugin-pages:

image

@souljorje
Copy link

souljorje commented Dec 15, 2022

@adrienboulle 🤷‍♂️ try to install latest typedoc & @knodes/typedoc-plugin-pages

@adrienboulle
Copy link

that's what I did oc ;)

@adrienboulle
Copy link

adrienboulle commented Dec 15, 2022

@souljorje on main branche:
this function calls this utils function that make this function call that does not exist

@GerkinDev
Copy link
Member

Yeah sry about that. Unfortunately, I'm super busy right now, but a new version will hopefully be released soon. It's almost done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working scope(plugin-pages)
Projects
None yet
Development

No branches or pull requests

4 participants