Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
252 views
in Technique[技术] by (71.8m points)

ivy - Error in compiling angular 11 (upgraded from angular 9) application

I have an angular 9 application which is now upgraded to angular 11. Now on compiling angular application I am getting below error.

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:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modules@angularcompiler-clisrc
gtscannotationssrccomponent.js:210:79)
    at NgccTraitCompiler.TraitCompiler.analyzeTrait (C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modules@angularcompiler-clisrc
gtscransformsrccompilation.js:346:40)
    at analyze (C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modules@angularcompiler-clisrc
gtscransformsrccompilation.js:298:58)
    at _loop_1 (C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modules@angularcompiler-clisrc
gtscransformsrccompilation.js:320:21)
    at NgccTraitCompiler.TraitCompiler.analyzeClass (C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modules@angularcompiler-clisrc
gtscransformsrccompilation.js:326:35)
    at NgccTraitCompiler.analyzeFile (C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modules@angularcompiler-cli
gccsrcanalysis
gcc_trait_compiler.js:48:26)
    at DecorationAnalyzer.analyzeProgram (C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modules@angularcompiler-cli
gccsrcanalysisdecoration_analyzer.js:140:39)
    at Transformer.analyzeProgram (C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modules@angularcompiler-cli
gccsrcpackagesransformer.js:130:57)
    at Transformer.transform (C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modules@angularcompiler-cli
gccsrcpackagesransformer.js:76:27)
    at C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modules@angularcompiler-cli
gccsrcexecutioncreate_compile_function.js:49:42
    at ClusterMaster.onWorkerMessage (C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modules@angularcompiler-cli
gccsrcexecutionclustermaster.js:195:27)
    at C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modules@angularcompiler-cli
gccsrcexecutionclustermaster.js:55:95
    at ClusterMaster.<anonymous> (C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modules@angularcompiler-cli
gccsrcexecutionclustermaster.js:293:57)
    at step (C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modulesslibslib.js:143:27)
    at Object.next (C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modulesslibslib.js:124:57)
    at C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modulesslibslib.js:117:75
    at new Promise (<anonymous>)
    at Object.__awaiter (C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modulesslibslib.js:113:16)
    at EventEmitter.<anonymous> (C:UsersRJhaveriDocumentsRonakSourceCodeDevelopmentSNSConversionAutomationsns-conversion
ode_modules@angularcompiler-cli
gccsrcexecutionclustermaster.js:287:32)
    at EventEmitter.emit (events.js:321:20)

Please suggest how to fix the issue.

question from:https://stackoverflow.com/questions/65935327/error-in-compiling-angular-11-upgraded-from-angular-9-application

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I think problem was due to application was upgraded directly from version 9 to version 11.

Finally, i had to again move to angular 9 version and then convert it to 10. And from version 10 to version 11. Now application is working perfectly fine.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...