从2.0.10升级到2.1.1后,我收到以下错误。我不知道我的哪个源文件导致了这个问题。任何提示都表示赞赏。
[10:30:50] Error: Debug Failure. False expression: Unexpected node.
Verbose Debug Information: Node 136 (UndefinedKeyword) was unexpected.
at Object.assert (C:\workspace\software-engineering\mean-ohne-angular\node_modules\typescript\lib\typescript.js:3001:23)
at Object.Debug.failBadSyntaxKind (C:\workspace\software-engineering\mean-ohne-angular\node_modules\typescript\lib\typescript.js:42746:55)
at serializeTypeNode (C:\workspace\software-engineering\mean-ohne-angular\node_modules\typescript\lib\typescript.js:44666:30)
at serializeTypeNode (C:\workspace\software-engineering\mean-ohne-angular\node_modules\typescript\lib\typescript.js:44637:56)
at serializeReturnTypeOfNode (C:\workspace\software-engineering\mean-ohne-angular\node_modules\typescript\lib\typescript.js:44563:24)
at addOldTypeMetadata (C:\workspace\software-engineering\mean-ohne-angular\node_modules\typescript\lib\typescript.js:44428:136)
at addTypeMetadata (C:\workspace\software-engineering\mean-ohne-angular\node_modules\typescript\lib\typescript.js:44416:17)
at transformAllDecoratorsOfDeclaration (C:\workspace\software-engineering\mean-ohne-angular\node_modules\typescript\lib\typescript.js:44241:13)
at generateClassElementDecorationExpression (C:\workspace\software-engineering\mean-ohne-angular\node_modules\typescript\lib\typescript.js:44288:40)
at generateClassElementDecorationExpressions (C:\workspace\software-engineering\mean-ohne-angular\node_modules\typescript\lib\typescript.js:44268:34)
[10:30:50] 'ts' errored after 4.37 s
答案 0 :(得分:0)
问题发生在tsconfig.json
,我有这两行:
"inlineSources": true,
"emitDecoratorMetadata": true,