ENOENT: dist folder can't be generated by both ng build and ng serve

374 views Asked by At

When I run the angular commands ng build or ng serve, I get the following error and the dist folder is not generated:

An unhandled exception occurred: ENOENT: no such file or directory, lstat 'C:\Users\khins\Desktop\EcommerceAngular\Ecommerce\dist' See "C:\Users\khins\AppData\Local\Temp\ng-MzMpV6\angular-errors.log" for further details.

Angular CLI: 13.3.3 Node: 14.17.6 Package Manager: npm 6.14.15 OS: win32 x64

angular.json:

   "options": {
            "outputPath": "dist/Ecommerce",
            "index": "src/index.html",

package.json:

    "@angular/forms": "~13.3.0",
    "@angular/platform-browser": "~13.3.0",
    "@angular/platform-browser-dynamic": "~13.3.0",
    "@angular/router": "~13.3.0",
    "@fortawesome/fontawesome-free": "^6.1.1",
    "bootstrap": "^5.1.3",
    "ngx-bootstrap": "^8.0.0",
    "rxjs": "~7.5.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.11.4"

I added ngx-bootstrap 8.0.0.0

0

There are 0 answers