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

crashes when upgrading from 0.26.11 to 0.27.0 or 0.27.1 #2789

Closed
pamapa opened this issue Nov 29, 2024 · 3 comments
Closed

crashes when upgrading from 0.26.11 to 0.27.0 or 0.27.1 #2789

pamapa opened this issue Nov 29, 2024 · 3 comments
Labels
bug Functionality does not match expectation

Comments

@pamapa
Copy link

pamapa commented Nov 29, 2024

Search terms

Expected Behavior

Should not crash.

Actual Behavior

Crashes.

Steps to reproduce the bug

You can see the behavior in this pull request: authts/oidc-client-ts#1757
Error:

Run npm run typedoc
  npm run typedoc
  shell: /usr/bin/bash -e {0}

> [email protected] typedoc
> typedoc

TypeDoc exiting with unexpected error:
TypeError: Cannot read properties of undefined (reading 'TypeParameter')
    at ReferenceType.createSymbolReference (file:///home/runner/work/oidc-client-ts/oidc-client-ts/node_modules/typedoc/dist/lib/models/types.js:782:70)
    at Object.convert (file:///home/runner/work/oidc-client-ts/oidc-client-ts/node_modules/typedoc/dist/lib/converter/types.js:190:35)
    at convertType (file:///home/runner/work/oidc-client-ts/oidc-client-ts/node_modules/typedoc/dist/lib/converter/types.js:80:38)
    at Converter.convertType (file:///home/runner/work/oidc-client-ts/oidc-client-ts/node_modules/typedoc/dist/lib/converter/converter.js:330:20)
    at file:///home/runner/work/oidc-client-ts/oidc-client-ts/node_modules/typedoc/dist/lib/converter/symbols.js:333:117
    at Array.map (<anonymous>)
    at Object.convertClassOrInterface (file:///home/runner/work/oidc-client-ts/oidc-client-ts/node_modules/typedoc/dist/lib/converter/symbols.js:333:88)
    at convertSymbol (file:///home/runner/work/oidc-client-ts/oidc-client-ts/node_modules/typedoc/dist/lib/converter/symbols.js:122:41)
    at Object.convertAlias (file:///home/runner/work/oidc-client-ts/oidc-client-ts/node_modules/typedoc/dist/lib/converter/symbols.js:494:9)
    at convertSymbol (file:///home/runner/work/oidc-client-ts/oidc-client-ts/node_modules/typedoc/dist/lib/converter/symbols.js:122:41)
Error: Process completed with exit code 6.

Environment

  • Typedoc version: 0.27.1
  • TypeScript version: 5.4.2
  • Node.js version: 18.x
  • OS: Linux
@pamapa pamapa added the bug Functionality does not match expectation label Nov 29, 2024
@willeastcott
Copy link

This is happening for the PlayCanvas API reference too after the same upgrade.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Nov 29, 2024

This appears to be because of the older TS version - I really need to get some automation in place to properly test with older TS versions...

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Nov 29, 2024

Annoyingly small patch with patch-package to make it work... will make a release with this later today.

diff --git a/node_modules/typedoc/dist/lib/models/types.js b/node_modules/typedoc/dist/lib/models/types.js
index 15ce050..136db9e 100644
--- a/node_modules/typedoc/dist/lib/models/types.js
+++ b/node_modules/typedoc/dist/lib/models/types.js
@@ -1,4 +1,4 @@
-import * as ts from "typescript";
+import ts from "typescript";
 import { getQualifiedName } from "../utils/tsutils.js";
 import { ReflectionSymbolId } from "./reflections/ReflectionSymbolId.js";
 import { findPackageForPath } from "../utils/fs.js";

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

3 participants