TS 4.8 未处理的 SyntaxKind:ImportClause

mar*_*adm 5 javascript typescript typescript-generics typescript-typings

我正在尝试将 ts 版本从 3.9.x 更新到最新版本,如果更新到 4.7.4 或更早版本没有问题,但 4.8.x 版本在编译时抛出错误。\n错误:Unhandled SyntaxKind: ImportClause

\n

除此之外,这是错误信息,我无法跟踪引发问题的文件名,有什么方法可以更好地调试它。我尝试登录节点模块包本身发现源文件对象不确定这是否是错误的根源。

\n
src/index.ts \xe2\x86\x92 dist/index.js...\nDeprecationWarning: 'createLiteral' has been deprecated since v4.0.0. Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead.\nDeprecationWarning: 'updateImportDeclaration' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.\nDeprecationWarning: 'createLiteralTypeNode' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.\nDeprecationWarning: 'updateImportTypeNode' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.\n/<path>/<package>/node_modules/typescript/lib/typescript.js:119204\n                throw e;\n                ^\n\nError: Debug Failure. Unhandled SyntaxKind: ImportClause.\n    at pipelineEmitWithHintWorker (/<path>/<package>/node_modules/typescript/lib/typescript.js:113127:22)\n    at pipelineEmitWithHint (/<path>/<package>/node_modules/typescript/lib/typescript.js:112660:17)\n    at pipelineEmitWithComments (/<path>/<package>/node_modules/typescript/lib/typescript.js:116301:13)\n    at pipelineEmit (/<path>/<package>/node_modules/typescript/lib/typescript.js:112600:13)\n    at emitExpression (/<path>/<package>/node_modules/typescript/lib/typescript.js:112584:13)\n    at emitImportDeclaration (/<path>/<package>/node_modules/typescript/lib/typescript.js:114544:13)\n    at pipelineEmitWithHintWorker (/<path>/<package>/node_modules/typescript/lib/typescript.js:112861:32)\n    at pipelineEmitWithHint (/<path>/<package>/node_modules/typescript/lib/typescript.js:112660:17)\n    at pipelineEmitWithComments (/<path>/<package>/node_modules/typescript/lib/typescript.js:116301:13)\n    at pipelineEmit (/<path>/<package>/node_modules/typescript/lib/typescript.js:112600:13)\n
Run Code Online (Sandbox Code Playgroud)\n