0

I am working on one of my application in AngularJS (CLI 9) framework.

Its successfully run by ng serve command and open in http://localhost:4200

but when i build it by ng build i got below error

Unable to copy assets: EFAULT: bad address in system call argument, copyfile directoryPath/src/favicon.ico -> directoryPath/dist/favicon.ico

below is my build code..

"build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "outputPath": "dist",
            "index": "src/index.html",
            "main": "src/main.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "tsconfig.app.json",
            "aot": false,
            "assets": [
              "src/favicon.ico",
              "src/assets"
            ],
            "styles": [
              "./src/styles.scss",
              "./node_modules/bootstrap/scss/bootstrap.scss",
              "./node_modules/font-awesome/scss/font-awesome.scss",
              "./node_modules/admin-lte/build/scss/AdminLTE.scss",
              "./node_modules/@ng-select/ng-select/themes/ant.design.theme.css",
              "./node_modules/ngx-toastr/toastr.css"
            ],
            "stylePreprocessorOptions": {
              "includePaths": [
                "./node_modules"
              ]
            },
            "scripts": [
              "./node_modules/jquery/dist/jquery.js",
              "./node_modules/popper.js/dist/umd/popper.js",
              "./node_modules/bootstrap/dist/js/bootstrap.js",
              "./node_modules/jquery-slimscroll/jquery.slimscroll.js",
              "./node_modules/icheck/icheck.js",
              "./node_modules/fastclick/lib/fastclick.js",
              "./node_modules/admin-lte/dist/js/adminlte.js"
            ]
          },
          "configurations": {
            "production": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.prod.ts"
                }
              ],
              "optimization": true,
              "outputHashing": "all",
              "sourceMap": false,
              "extractCss": true,
              "namedChunks": false,
              "aot": true,
              "extractLicenses": true,
              "vendorChunk": false,
              "buildOptimizer": true,
              "budgets": [
                {
                  "type": "initial",
                  "maximumWarning": "2mb",
                  "maximumError": "5mb"
                },
                {
                  "type": "anyComponentStyle",
                  "maximumWarning": "6kb",
                  "maximumError": "10kb"
                }
              ]
            }
          }
        }

THis is all angular dependencies

"dependencies": {
    "@angular/animations": "~9.0.0",
    "@angular/common": "~9.0.0",
    "@angular/compiler": "~9.0.0",
    "@angular/core": "~9.0.0",
    "@angular/forms": "~9.0.0",
    "@angular/platform-browser": "~9.0.0",
    "@angular/platform-browser-dynamic": "~9.0.0",
    "@angular/router": "~9.0.0"
},
"devDependencies": {
    "@angular-devkit/build-angular": "~0.900.1",
    "@angular/cli": "~9.0.1",
    "@angular/compiler-cli": "~9.0.0",
    "@angular/language-service": "~9.0.0",
}

I have researched on google but i dont find any solutions..

let me know how to resolve this issue.

georgeawg
  • 48,608
  • 13
  • 72
  • 95
Akash Chavda
  • 1,185
  • 1
  • 11
  • 29

1 Answers1

0

It is node version issue.. I update node version 10 to 12+ then its resolved..

Akash Chavda
  • 1,185
  • 1
  • 11
  • 29