Anguar v11 upgrade - Call retries were exceeded

I’ve upgraded my Ionic project to use the latest version of Angular 11 and I’m facing the following issue while executing ionic build :
image

When I try to run the project with ionic serve everything is fine and the application is working.

This is my tsconfig.json file:

{
  "compilerOptions": {
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2015",
    "module": "es2020",
    "lib": ["es2018", "dom"]
  }
}

And the devDependencies related to Angular and Ionic from package.json file:

    "@angular-devkit/architect": "^0.1102.8",
    "@angular-devkit/build-angular": "^0.1102.8",
    "@angular-devkit/core": "^11.2.8",
    "@angular-devkit/schematics": "^11.2.8",
    "@angular/cli": "11.2.8",
    "@angular/compiler": "11.2.10",
    "@angular/compiler-cli": "^11.2.10",
    "@angular/language-service": "^11.2.10",
    "@ionic/angular-toolkit": "^3.1.1",

I would be really grateful if you can tell me where is the problem. Thanks in advance!

P.S. If you need more information about the project, please let me know.

Can you try removing these and just installing

"@angular-devkit/build-angular": "^0.1102.8",

Hi, I removed them and the error is the same. Do you need more information about the project configurations and dependencies? @mhartington

I’d checkout the starter projects for a reference. Without being able to inspect your app, I can’t say for sure

What do you need from my project? It was with Angular 9. I updated it to Angular v10 and then to v11. I’m using "@ionic/angular": "^5.6.4", and also I’m using capacitor for building my app for mobile devices.

This is my angular.json file

{
  "$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
  "version": 1,
  "projects": {
    "app": {
      "root": "",
      "projectType": "application",
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "progress": false,
            "outputPath": "www",
            "index": "src/index.html",
            "main": "src/main.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "src/tsconfig.app.json",
            "assets": [
              {
                "glob": "**/*",
                "input": "src/assets",
                "output": "assets"
              },
              {
                "glob": "**/*.svg",
                "input": "node_modules/ionicons/dist/ionicons/svg",
                "output": "/svg"
              },
              "src/manifest.json"
            ],
            "styles": [
              {
                "input": "src/theme/variables.scss",
                "inject": true
              },
              {
                "input": "src/global.scss",
                "inject": true
              },
              "./node_modules/ngx-lightbox/lightbox.css"
            ],
            "scripts": []
          },
          "configurations": {
            "production": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.prod.ts"
                }
              ],
              "optimization": true,
              "outputHashing": "all",
              "sourceMap": false,
              "namedChunks": false,
              "aot": true,
              "extractLicenses": true,
              "vendorChunk": false,
              "buildOptimizer": true,
              "serviceWorker": true
            }
          }
        },
        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "options": {
            "browserTarget": "app:build"
          },
          "configurations": {
            "production": {
              "browserTarget": "app:build:production"
            }
          }
        },
        "extract-i18n": {
          "builder": "@angular-devkit/build-angular:extract-i18n",
          "options": {
            "browserTarget": "app:build"
          }
        },
        "test": {
          "builder": "@angular-devkit/build-angular:karma",
          "options": {
            "main": "src/test.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "src/tsconfig.spec.json",
            "karmaConfig": "src/karma.conf.js",
            "styles": [
              {
                "input": "src/theme/variables.scss",
                "inject": true
              },
              {
                "input": "src/global.scss",
                "inject": true
              }
            ],
            "scripts": [],
            "assets": [
              {
                "glob": "favicon.ico",
                "input": "src/",
                "output": "/"
              },
              {
                "glob": "**/*",
                "input": "src/assets",
                "output": "/assets"
              },
              "src/manifest.json"
            ]
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
            "exclude": ["**/node_modules/**"]
          }
        },
        "ionic-cordova-build": {
          "builder": "@ionic/angular-toolkit:cordova-build",
          "options": {
            "browserTarget": "app:build"
          },
          "configurations": {
            "production": {
              "browserTarget": "app:build:production"
            }
          }
        },
        "ionic-cordova-serve": {
          "builder": "@ionic/angular-toolkit:cordova-serve",
          "options": {
            "cordovaBuildTarget": "app:ionic-cordova-build",
            "devServerTarget": "app:serve"
          },
          "configurations": {
            "production": {
              "cordovaBuildTarget": "app:ionic-cordova-build:production",
              "devServerTarget": "app:serve:production"
            }
          }
        }
      }
    },
    "app-e2e": {
      "root": "e2e/",
      "projectType": "application",
      "architect": {
        "e2e": {
          "builder": "@angular-devkit/build-angular:protractor",
          "options": {
            "protractorConfig": "e2e/protractor.conf.js",
            "devServerTarget": "app:serve"
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": "e2e/tsconfig.e2e.json",
            "exclude": ["**/node_modules/**"]
          }
        }
      }
    }
  },
  "cli": {
    "defaultCollection": "@ionic/angular-toolkit"
  },
  "schematics": {
    "@ionic/angular-toolkit:component": {
      "styleext": "scss"
    },
    "@ionic/angular-toolkit:page": {
      "styleext": "scss"
    }
  }
}

What npm version are you using?

npm 7 and npm 6 depending on what i need to use. But that shouldn’t be an issue.

Can you run ionic build --verbose and post the output?

I think I found the issue. It was related to my local nodejs version - I was using v10.17.0 and I’ve updated to v15.11.0 and everything is fine.

Hmm, but now we have a problem with ionic build --prod. I’m getting the same error. When i run it with --verbose argument, I’m getting the following response:

  ionic:bootstrap local CLI 4.12.0 found at /Users/darkoandreev/Desktop/delegates.i4.app/node_modules/ionic/package.json +0ms
  ionic:lib Terminal info: { tty: true, ci: false, windows: false } +0ms
  ionic:lib CLI global options: { _: [ 'build' ], help: null, h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json: null, prod: true, project: null, '--': [] } +2ms
  ionic:lib:project Project type from config: @ionic/angular (angular) +0ms
  ionic:lib:project Project details: { configPath: '/Users/darkoandreev/Desktop/delegates.i4.app/ionic.config.json', errors: [], context: 'app', type: 'angular' } +0ms
  ionic Context: { binPath: '/Users/darkoandreev/Desktop/delegates.i4.app/node_modules/ionic/bin/ionic', libPath: '/Users/darkoandreev/Desktop/delegates.i4.app/node_modules/ionic', execPath: '/Users/darkoandreev/Desktop/delegates.i4.app', version: '4.12.0' } +0ms
  ionic:lib:telemetry Sending telemetry for command: 'ionic build' [ '--prod', '--verbose', '--interactive', '--color' ] +0ms
  ionic:lib:hooks Looking for ionic:build:before npm script. +0ms
  ionic:lib:build Looking for ionic:build npm script. +0ms
> ng run app:build:production
  ng:analytics getGlobalAnalytics +0ms
  ng:analytics Client Analytics config found: false +3ms
  ng:analytics Analytics disabled. Ignoring all analytics. +1ms
  ng:analytics getSharedAnalytics +0ms
  babel:config:config-chain No config is applied to "/Users/darkoandreev/Desktop/delegates.i4.app/node_modules/css-loader/dist/runtime/api.js" because it matches one of `ignore: [null]` from "/Users/darkoandreev/Desktop/delegates.i4.app" +0ms
  babel:config:config-chain No config is applied to "/Users/darkoandreev/Desktop/delegates.i4.app/src/main.ts" because it matches one of `ignore: [null]` from "/Users/darkoandreev/Desktop/delegates.i4.app" +4s
  babel:config:config-chain No config is applied to "/Users/darkoandreev/Desktop/delegates.i4.app/src/polyfills.ts" because it matches one of `ignore: [null]` from "/Users/darkoandreev/Desktop/delegates.i4.app" +0ms
...
[ERROR] An error occurred while running subprocess ng.
        
        ng run app:build:production exited with exit code 127.
        
        Re-running this command with the --verbose flag may provide more information.
  ionic:utils-process onBeforeExit handler: process.exit received +0ms
  ionic:utils-process onBeforeExit handler: running 1 functions +0ms
  ionic:utils-process onBeforeExit handler: exiting (exit code 127) +37ms

I’m getting a lot of:

babel:config:config-chain No config is applied to...

What does it mean?

Hmm, haven’t seen that before. Could you post your project to github and share a link? I could look later today