问题描述
我有一个 angular 9 应用程序,现在已升级到 angular 11。 现在在编译角度应用程序时,我遇到了以下错误。
Compiling @angular/material/core : es2015 as esm2015
Compiling @angular/cdk/scrolling : es2015 as esm2015
Compiling @angular/common/http : es2015 as esm2015
Error: Error on worker #2: TypeError: Cannot read property 'map' of null
at ComponentDecoratorHandler.analyze (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\@angular\compiler-cli\src\ngtsc\annotations\src\component.js:210:79)
at NgccTraitCompiler.TraitCompiler.analyzeTrait (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\@angular\compiler-cli\src\ngtsc\transform\src\compilation.js:346:40)
at analyze (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\@angular\compiler-cli\src\ngtsc\transform\src\compilation.js:298:58)
at _loop_1 (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\@angular\compiler-cli\src\ngtsc\transform\src\compilation.js:320:21)
at NgccTraitCompiler.TraitCompiler.analyzeClass (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\@angular\compiler-cli\src\ngtsc\transform\src\compilation.js:326:35)
at NgccTraitCompiler.analyzeFile (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\@angular\compiler-cli\ngcc\src\analysis\ngcc_trait_compiler.js:48:26)
at DecorationAnalyzer.analyzeProgram (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\@angular\compiler-cli\ngcc\src\analysis\decoration_analyzer.js:140:39)
at Transformer.analyzeProgram (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\@angular\compiler-cli\ngcc\src\packages\transformer.js:130:57)
at Transformer.transform (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\@angular\compiler-cli\ngcc\src\packages\transformer.js:76:27)
at C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\@angular\compiler-cli\ngcc\src\execution\create_compile_function.js:49:42
at ClusterMaster.onWorkerMessage (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:195:27)
at C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:55:95
at ClusterMaster.<anonymous> (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:293:57)
at step (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\tslib\tslib.js:143:27)
at Object.next (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\tslib\tslib.js:124:57)
at C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\tslib\tslib.js:117:75
at new Promise (<anonymous>)
at Object.__awaiter (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\tslib\tslib.js:113:16)
at EventEmitter.<anonymous> (C:\Users\RJhaveri\Documents\Ronak\SourceCode\Development\SNSConversionAutomation\sns-conversion\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:287:32)
at EventEmitter.emit (events.js:321:20)
请建议如何解决问题。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)