0
votes

Full error message -

AggregateException: One or more errors occurred. (One or more errors occurred. (The npm script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: This version of CLI is only compatible with Angular versions ^11.0.0-beta || >=11.0.0 <12.0.0,

but Angular version 8.0.0 was found instead.

Please visit the link below to find instructions on how to update Angular.

https://angular-update-guide.firebaseapp.com/

**When researching this issue most solutions state to change the angular.json file to "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", "options": { "sourceMap": { "scripts": true, "styles": true, "vendor": true },

But when I check my angular.json file all I see is:

"architect": { "build": { "builder": "@angular-devkit/build-angular:browser", "options": { "progress": true, "extractCss": true, "outputPath": "dist", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.app.json", "assets": [ "src/assets" ],**

I've been dealing with this error for a while so any solutions or assistance are appreciated. Thanks!

2
Update your angular version. Or remove your angular cli and install an old version.Henrik Bøgelund Lavstsen

2 Answers

2
votes

The correct angular.json options are

"serve": {
  "builder": "@angular-devkit/build-angular:dev-server",
  "options": {
    "sourceMap": {
      "scripts": true,
      "styles": true,
      "vendor": true
    },
...

Verified on 10.0.. (Updated verfied version from 7.2.15 > 10.0.)

0
votes

Actually I fixed this issue by including the following dependencies and devDependencies in my package.json file... I then ran npm install in both my project root and ClientApp folder. The only reason I'm not accepting this as the main answer is because the answer accepted as solution is included in similar issues, I did make that change and perhaps that also had to do with the resolve.

"dependencies": {
    "@angular/common": "~11.0.5",
    "@angular/compiler": "~11.0.5",
    "@angular/core": "~11.0.5",
    "@angular/forms": "~11.0.5",
    "@angular/platform-browser": "~11.0.5",
    "@angular/platform-browser-dynamic": "~11.0.5",
    "@angular/router": "~11.0.5",
    "zone.js": "^~0.10.3"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.1100.5",
    "@angular/cli": "^11.0.5",
    "@angular/compiler": "^11.0.5",
    "@angular/compiler-cli": "^11.0.5"
  }