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

Cannot read properties of undefined (reading 'qualifiedName') #283

Closed
jsbrain opened this issue Jan 18, 2022 · 2 comments
Closed

Cannot read properties of undefined (reading 'qualifiedName') #283

jsbrain opened this issue Jan 18, 2022 · 2 comments

Comments

@jsbrain
Copy link

jsbrain commented Jan 18, 2022

TypeDoc exiting with unexpected error:
TypeError: Cannot read properties of undefined (reading 'qualifiedName')
    at Renderer.attemptExternalResolution (/repo/node_modules/typedoc/dist/lib/output/renderer.js:114:19)
    at Object.attemptExternalResolution (/repo/node_modules/typedoc-plugin-markdown/dist/resources/helpers/attemptExternalResolution.js:6:28)
    at getReferenceType (/repo/node_modules/typedoc-plugin-markdown/dist/resources/helpers/type.js:119:44)
    at ReferenceType.<anonymous> (/repo/node_modules/typedoc-plugin-markdown/dist/resources/helpers/type.js:10:20)
    at /repo/node_modules/typedoc-plugin-markdown/dist/resources/helpers/type.js:108:140
    at Array.map (<anonymous>)
    at /repo/node_modules/typedoc-plugin-markdown/dist/resources/helpers/type.js:107:29
    at Array.map (<anonymous>)
    at getFunctionType (/repo/node_modules/typedoc-plugin-markdown/dist/resources/helpers/type.js:100:39)
    at getReflectionType (/repo/node_modules/typedoc-plugin-markdown/dist/resources/helpers/type.js:69:15)

caused by

    /**
     * Marked as internal for now. Using this requires the internal `getSymbol()` method on ReferenceType.
     * Someday that needs to be fixed so that this can be made public. ReferenceTypes really shouldn't store
     * symbols so that we don't need to keep the program around forever.
     * @internal
     */
    attemptExternalResolution(type) {
        if (!type.qualifiedName || !type.package) { // <- this
            return;
        }
        const resolvers = this.unknownSymbolResolvers.get(type.package);
        for (const resolver of resolvers || []) {
            const resolved = resolver(type.qualifiedName);
            if (resolved)
                return resolved;
        }
    }

in node_modules/typedoc/dist/lib/output/renderer.js.

This fixed it for me: if (!type || !type.qualifiedName || !type.package) { but not sure if it won't cause other problems.

{
    ...,
    "typedoc": "^0.22.8",
    "typedoc-plugin-markdown": "^3.11.11",
    "typescript": "^4.4.4"
}
@chen86860
Copy link

Downgrade the version of typedoc to 0.22.10 is okay for me.

@tgreyuk
Copy link
Member

tgreyuk commented Jan 18, 2022

Please try [email protected]

@tgreyuk tgreyuk closed this as completed Jan 18, 2022
Ffloriel added a commit to tradingview/lightweight-charts that referenced this issue Jan 19, 2022
- fix qualified name bug in typedoc-plugin-markdown
typedoc2md/typedoc-plugin-markdown#283
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

3 participants