Closed Alon-L closed 4 years ago
TypeScript 3.7.4
This is your issue. You ignored the warning about incompatible peer dependencies. You'll need to use an older version of TypeDoc or install a newer version of TypeScript for your project.
warning " > typedoc@0.17.1" has incorrect peer dependency "typescript@>=3.8.3".
Okay I updated to the latest typescript version and now I'm getting this error:
E:\Coding\nodejs\bot-generator>typedoc --out docs src
Using TypeScript 3.8.3 from E:\Coding\nodejs\bot-generator\node_modules\typescript\lib
Rendering [----------------------------------------] 0%E:\Coding\nodejs\bot-generator\node_modules\
marked\src\marked.js:111
throw e;
^
TypeError: this.renderer.html is not a function
Please report this to https://github.com/markedjs/marked.
at InlineLexer.output (E:\Coding\nodejs\bot-generator\node_modules\marked\src\InlineLexer.js:85
:30)
at Parser.tok (E:\Coding\nodejs\bot-generator\node_modules\marked\src\Parser.js:97:36)
at Parser.parse (E:\Coding\nodejs\bot-generator\node_modules\marked\src\Parser.js:47:19)
at Function.parse (E:\Coding\nodejs\bot-generator\node_modules\marked\src\Parser.js:30:19)
at marked (E:\Coding\nodejs\bot-generator\node_modules\marked\src\marked.js:103:19)
at MarkedPlugin.onParseMarkdown (E:\Coding\nodejs\bot-generator\node_modules\typedoc\dist\lib\o
utput\plugins\MarkedPlugin.js:115:28)
at E:\Coding\nodejs\bot-generator\node_modules\typedoc\dist\lib\utils\events.js:259:33
at triggerApi (E:\Coding\nodejs\bot-generator\node_modules\typedoc\dist\lib\utils\events.js:110
:13)
at Renderer.trigger (E:\Coding\nodejs\bot-generator\node_modules\typedoc\dist\lib\utils\events.
js:252:13)
at MarkedPlugin.parseMarkdown (E:\Coding\nodejs\bot-generator\node_modules\typedoc\dist\lib\out
put\plugins\MarkedPlugin.js:87:20)
Looks like Marked broke in 0.8.1 - https://github.com/markedjs/marked/issues/1621 and since it was a patch version it was automatically pulled in.
Do you have a HTML comment in a heading somewhere? Removing that should fix this until Marked publishes a fix.
I couldn't find any HTML comments.
I searched for characters such as -
and #
but I can't find anything that resembles markdown or HTML.
Edit: Is there anything I'm missing?
Hard to say, TypeDoc also reads your README.md
file, so if that has HTML in it it might break. I'll publish 0.17.2 shortly pinning marked to 0.8.0 until they fix this issue.
After removing all content from README.md it suddenly works. Thank you for your support.
0.17.2 published, if you upgrade to that your original readme should work :)
Awesome, problem fixed. Thanks!
You ignored the warning about incompatible peer dependencies.
@Gerrit0 not necessarily user error. There doesn't seem to be a warning for the peer deps when installing:
✭ yarn add -D typedoc
yarn add v1.16.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > mini-css-extract-plugin@0.9.0" has unmet peer dependency "webpack@^4.4.0".
warning " > react-loadable-ssr-addon@0.2.0" has unmet peer dependency "webpack@>=4.41.1".
warning "react-pose > popmotion-pose > pose-core > rollup-plugin-typescript2@0.25.2" has unmet peer dependency "rollup@>=1.26.3".
warning " > use-react-router@1.0.7" has unmet peer dependency "react-router@^5.0.0".
warning " > copy-webpack-plugin@5.0.5" has unmet peer dependency "webpack@^4.0.0".
warning " > jest-svg-transformer@1.0.0" has unmet peer dependency "jest@>22".
warning " > raw-loader@3.1.0" has unmet peer dependency "webpack@^4.3.0".
warning " > ts-jest@24.1.0" has unmet peer dependency "jest@>=24 <25".
warning " > workbox-webpack-plugin@4.3.1" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
[4/4] 🔨 Building fresh packages...
success Saved 1 new dependency.
info Direct dependencies
└─ typedoc@0.17.7
info All dependencies
└─ typedoc@0.17.7
✨ Done in 12.59s.
Yet it still fails:
✭ yarn typedoc --out api-docs src
yarn run v1.16.0
$ ./frontend/node_modules/.bin/typedoc --out api-docs src
Using TypeScript 3.7.5 from ./frontend/node_modules/typescript/lib
./frontend/node_modules/typedoc/dist/lib/converter/context.js:194
return node['name'] && (ts.isIdentifierOrPrivateIdentifier(node['name']) ||
^
TypeError: ts.isIdentifierOrPrivateIdentifier is not a function
...
When I add a specific version, or re-install, then it warns:
✭ yarn add -D typedoc@0.17.1
yarn add v1.16.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > mini-css-extract-plugin@0.9.0" has unmet peer dependency "webpack@^4.4.0".
warning " > react-loadable-ssr-addon@0.2.0" has unmet peer dependency "webpack@>=4.41.1".
warning "react-pose > popmotion-pose > pose-core > rollup-plugin-typescript2@0.25.2" has unmet peer dependency "rollup@>=1.26.3".
warning " > use-react-router@1.0.7" has unmet peer dependency "react-router@^5.0.0".
warning " > copy-webpack-plugin@5.0.5" has unmet peer dependency "webpack@^4.0.0".
warning " > jest-svg-transformer@1.0.0" has unmet peer dependency "jest@>22".
warning " > raw-loader@3.1.0" has unmet peer dependency "webpack@^4.3.0".
warning " > ts-jest@24.1.0" has unmet peer dependency "jest@>=24 <25".
warning " > workbox-webpack-plugin@4.3.1" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
warning " > typedoc@0.17.1" has incorrect peer dependency "typescript@>=3.8.3".
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 9 new dependencies.
info Direct dependencies
└─ typedoc@0.17.1
info All dependencies
├─ backbone@1.4.0
├─ handlebars@4.7.6
├─ highlight.js@9.18.1
├─ jquery@3.5.1
├─ marked@0.8.2
├─ shelljs@0.8.4
├─ typedoc-default-themes@0.8.0
├─ typedoc@0.17.1
└─ underscore@1.10.2
✨ Done in 13.51s.
That looks like a bug with yarn ^ I'd be open to a PR that adds TS version checking before trying to convert the project to warn the user.
I have this warning with typedoc :
DeprecationWarning: 'isIdentifierOrPrivateIdentifier' has been deprecated since v4.2.0. Use isMemberName
instead.
any idea?
Expected Behavior
TypeDoc should generate new documentation for the files in the
src
directory.Actual Behavior
TypeDoc throws an error saying:
Steps to reproduce the bug
npm install typedoc --save-dev
ornpm install typedoc --global
(I tried both of them).typedoc --out docs src
(I also tried using a config file, which led to the same error)Environment