ENOENT: no such file or directory, lstat coreui-icons.css in Angular

Dung Do Tien Aug 27 2021 219

Hello guys!

I have upgrade Angular version 7 to 11 by using CoreUI template version 2.11.2. But when I upgrade I got an error ENOENT: no such file or directory, lstat coreui-icons.css.

I tried to compare package.json file of CoreUI template and update all of them but it still does not work for me.

An unhandled exception occurred: ENOENT: no such file or directory, lstat 'E:\Project\Angular\Main\Source_New\Admin\Source\admin\DFG.APP.CMSClient\node_modules\@coreui\icons\css\coreui-icons.css'
See "C:\Users\Admin\AppData\Local\Temp\ng-p1Watr\angular-errors.log" for further details.

Old version:

Angular CLI: 7.3.9
Node: 14.17.5
OS: win32 x64
Angular: 7.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.9
@angular-devkit/build-angular     0.13.8
@angular-devkit/build-optimizer   0.13.8
@angular-devkit/build-webpack     0.13.8
@angular-devkit/core              7.3.9
@angular-devkit/schematics        7.3.9
@angular/cdk                      7.3.3
@angular/cli                      7.3.9
@angular/material                 7.3.3
@ngtools/webpack                  7.3.8
@schematics/angular               7.3.9
@schematics/update                0.13.9
rxjs                              6.4.0
typescript                        3.2.4
webpack                           4.29.0

And new version 11:

Angular CLI: 11.2.14
Node: 14.17.5
OS: win32 x64

Angular: 11.2.14
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.14
@angular-devkit/build-angular   0.1102.14
@angular-devkit/core            11.2.14
@angular-devkit/schematics      11.2.14
@angular/cdk                    11.2.13
@angular/http                   7.2.16
@angular/material               7.3.7
@schematics/angular             11.2.14
@schematics/update              0.1102.14
rxjs                            6.6.7
typescript                      4.1.6

Thanks for any suggestions!

Have 1 answer(s) found.
  • G

    Gulam Aug 27 2021

    Oh, you can try open angular.json file and find that CSS file.

     "styles": [ 
                  "node_modules/@coreui/icons/css/coreui-icons.css"  // Pls comment this line if it has in your file
                ],

    you can find coreui-icons.css  in styles array, if it has pls comment it out and that bug will be solved for you.

Leave An Answer
* NOTE: You need Login before leave an answer

* Type maximum 2000 characters.

* All comments have to wait approved before display.

* Please polite comment and respect questions and answers of others.

Popular Tips

X Close