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

ts.isIdentifierOrPrivateIdentifier is not a function #1257

Closed
Gerrit0 opened this issue Mar 30, 2020 · 0 comments
Closed

ts.isIdentifierOrPrivateIdentifier is not a function #1257

Gerrit0 opened this issue Mar 30, 2020 · 0 comments

Comments

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 30, 2020

TypeDoc 0.17 moves TypeScript from a direct dependency to a peer dependency.

This means that when you npm i typedoc, TypeDoc will use the TypeScript version from your project instead of bundling its own. This has some advantages.

  1. You can upgrade TS and use new features even if TypeDoc doesn't support them yet.
  2. TypeDoc's bundle size drops to a third of its previous size - https://bundlephobia.com/[email protected]

However, this means that if you use a version of TypeScript which is incompatible with TypeDoc, you will likely experience crashes. TypeDoc specifies the versions of TypeScript that it expects to be compatible with.

typedoc/package.json

Lines 33 to 35 in c296503

"peerDependencies": {
"typescript": ">=3.8.3"
},

However, if you install an older version of TypeScript, most package managers won't refuse to install the latest TypeDoc, they will give you a warning, but lots of people ignore warnings.

> npm i [email protected] [email protected]
npm WARN [email protected] requires a peer of typescript@>=3.8.3 but none is installed. You must install peer dependencies
yourself.

If you are experiencing crashes when using the latest TypeDoc you have two options.

  1. Upgrade your project's TypeScript to a newer version.
  2. Use an older TypeDoc version

I was surprised by how many people have noted that the latest TypeDoc breaks on their system... so I decided this should be a good issue to pin for a couple weeks.

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

1 participant