我运行命令:
typedoc --out ./typeDocDocs ./src
启动,然后显示错误,对我什么也没说:
Using TypeScript 3.2.4 from MY_PROJECT_PATH\node_modules\typescript\lib
MY_PROJECT_PATH\node_modules\typedoc\dist\lib\converter\context.js:194
return node['name'] && (ts.isIdentifierOrPrivateIdentifier(node['name']) ||
^
TypeError: ts.isIdentifierOrPrivateIdentifier is not a function
at isNamedNode (MY_PROJECT_PATH\node_modules\typedoc\dist\lib\converter\context.js:194:32)
at Context.getSymbolAtLocation (MY_PROJECT_PATH\node_modules\typedoc\dist\lib\converter\context.js:47:24)
at Object.createDeclaration (MY_PROJECT_PATH\node_modules\typedoc\dist\lib\converter\factories\declaration.js:61:32)
at ClassConverter.convert (MY_PROJECT_PATH\node_modules\typedoc\dist\lib\converter\nodes\class.js:28:34)
at Converter.convertNode (MY_PROJECT_PATH\node_modules\typedoc\dist\lib\converter\converter.js:116:53)
at MY_PROJECT_PATH\node_modules\typedoc\dist\lib\converter\nodes\block.js:58:32
at Array.forEach (<anonymous>)
at BlockConverter.convertStatements (MY_PROJECT_PATH\node_modules\typedoc\dist\lib\converter\nodes\block.js:56:29)
at MY_PROJECT_PATH\node_modules\typedoc\dist\lib\converter\nodes\block.js:43:26
at Context.withScope (MY_PROJECT_PATH\node_modules\typedoc\dist\lib\converter\context.js:108:9)
TypeDoc版本0.17.1
有人可以帮助我运行TypeDoc吗?
答案 0 :(得分:2)
看起来像上个月引入的incompatibility with TypeScript version。
我刚刚将此问题隔离到v0.17.0,因此,如果您运行older version,则应该可以使其正常运行。我的与npm i -D typedoc@0.16.11
合作。