Reputation: 111
After Upgrading to Angular 9 and trying to run my project I got this error :
Compiling @angular/common/http : module as esm5
Compiling angular-font-awesome : module as esm5
Compiling angular-font-awesome : module as esm5
Error: Error on worker #5: Error: Failed to find exported name of node (CommonModule = (function () {
function CommonModule() {
}
return CommonModule;
}())) in 'C:/Users/.../node_modules/angular-font-awesome/dist/angular-font-awesome.es5.js'.
at Object.findExportedNameOfNode (C:\Users\...\node_modules\@angular\compiler-cli\src\ngtsc\imports\src\find_export.js:35:19)
at LogicalProjectStrategy.emit (C:\Users\Ghaida\...\node_modules\@angular\compiler-cli\src\ngtsc\imports\src\emitter.js:228:38)
at ReferenceEmitter.emit (C:\Users\...\node_modules\@angular\compiler-cli\src\ngtsc\imports\src\emitter.js:71:44)
at Object.toR3Reference (C:\Users\...\node_modules\@angular\compiler-cli\src\ngtsc\annotations\src\util.js:173:31)
at NgModuleDecoratorHandler._toR3Reference (C:\Users\...\node_modules\@angular\compiler-cli\src\ngtsc\annotations\src\ng_module.js:415:31)
at C:\Users\...\node_modules\@angular\compiler-cli\src\ngtsc\annotations\src\ng_module.js:196:72
at Array.map (<anonymous>)
at NgModuleDecoratorHandler.analyze (C:\Users\...\node_modules\@angular\compiler-cli\src\ngtsc\annotations\src\ng_module.js:196:38)
this is the result of running ng version :
Angular CLI: 9.1.0
Node: 10.15.0
OS: win32 x64
Angular: 9.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.901.0
@angular-devkit/build-angular 0.901.0
@angular-devkit/build-optimizer 0.901.0
@angular-devkit/build-webpack 0.901.0
@angular-devkit/core 9.1.0
@angular-devkit/schematics 9.1.0
@angular/http 7.2.16
@ngtools/webpack 9.1.0
@schematics/angular 9.1.0
@schematics/update 0.901.0
rxjs 6.5.4
typescript 3.8.3
webpack 4.42.0
PS: I runner 'ng update' and got ' we analysed your package.json and everything seems to be in order. '
Upvotes: 4
Views: 5806
Reputation: 580
This library angular-font-awesome is built with Angular v4!! It is not going to be possible to support it in v9. It should be removed from package.json. Here is the issue on ngcc project
Upvotes: 0
Reputation: 66
In error it comes when compile the font awesome package. When I show that i remove the package from ngModule and It works.
Upvotes: 0
Reputation: 111
Problem solved after removing
and running npm install
Upvotes: 5