153

When I start to run my Application, I get this error:

**[error] Error: Job name "..getProjectMetadata" does not exist.**
     at Observable._subscribe (/Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/src/experimental/jobs/simple-scheduler.js:350:23)
     at Observable._trySubscribe (/Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Observable.js:44:25)
     at Observable.subscribe (/Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Observable.js:30:22)
     at /Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/util/subscribeTo.js:22:31
     at Object.subscribeToResult (/Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/util/subscribeToResult.js:10:45)
     at SwitchMapSubscriber._innerSub (/Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/operators/switchMap.js:65:54)
     at SwitchMapSubscriber._next (/Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/operators/switchMap.js:55:14)
     at SwitchMapSubscriber.Subscriber.next (/Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:66:18)
     at SwitchMapSubscriber.notifyNext (/Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/operators/switchMap.js:86:26)
     at InnerSubscriber._next (/Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/InnerSubscriber.js:28:21)
     at InnerSubscriber.Subscriber.next (/Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:66:18)
     at /Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/util/subscribeTo.js:17:28
     at Object.subscribeToResult (/Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/util/subscribeToResult.js:10:45)
     at SwitchMapSubscriber._innerSub (/Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/operators/switchMap.js:65:54)
     at SwitchMapSubscriber._next (/Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/operators/switchMap.js:55:14)
     at SwitchMapSubscriber.Subscriber.next (/Users/vasil/KSS/kssfrontend/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:66:18)

I have these versions: Angular CLI: 8.3.19, Node: 12.14.0.

Any Idea what causes this problem?

kae_screechae
  • 169
  • 12
vasil001
  • 2,501
  • 4
  • 8
  • 22

12 Answers12

290

It seems to be a problem with @angular-devkit/build-angular.

Try updating it by running

npm i @angular-devkit/build-angular

Or downgrading it by specifying a previous version, such as

npm i @angular-devkit/build-angular@0.803.24
gattsbr
  • 3,762
  • 1
  • 22
  • 34
  • 78
    Updating the version didn't work for me, but downgrading to that specific one did it for me. – João Paiva Feb 07 '20 at 00:39
  • 8
    worked for me i checked package.json in my github and upgraded to following version npm i @angular-devkit/build-angular@~0.803.17 and it perfectly worked for me – Vikas Kandari Feb 07 '20 at 10:06
  • 3
    for ionic 5 trying to add leaflet maps, build-angular in package.json was showing 0.900.1; that was causing the problem; downgrading to the other packages at 0.801.12 brought the high vulnerabilities back; downgrading to 0.803.24 worked.. no more vulnerabilities but was still working as ionic 5 shows won't work with 9.0 angular – Captain Fantastic Feb 09 '20 at 04:38
  • 2
    This issue usually comes when we are installing an angular theme. For me, downgrading the version worked. – BIJAY Feb 10 '20 at 07:01
  • 1
    How this should be even useful? How one determines to which version downgrade??? LOL – Liquid Core Feb 27 '20 at 10:56
  • 1
    For me, downgrading to 0.801.2 worked (i.e., npm i @angular-devkit/build-angular@0.801.2). Thank you. – Mohsen Mar 22 '20 at 11:06
  • 1
    Try ng update @angular/cli @angular/core (answered by @ColemanTO) It will update the angular project and fix this error – Harinath May 06 '20 at 08:23
  • 1
    It can happen if you use `npm audit fix --force`. The following message speaks for itself: `npm WARN using --force I sure hope you know what you are doing.` –  Jun 06 '20 at 12:06
  • 1
    Also work for me after downgrading to a lower version of angular – King Jun 20 '20 at 22:23
  • 1
    "npm i @angular-devkit/build-angular@0.803.24" it worked for me thanks. – Nisanur Jul 20 '20 at 12:50
  • 5
    Since everyone is mentioning specific versions that work for them, it might be helpful to point out that the library has tags that point to the latest supported version for your CLI version. If you are using Angular 8, you can upgrade to the latest compatible version with `npm i @angular-devkit/build-angular@v8-lts`, which is more likely to work than whatever version was latest a few months ago. See the "versions" tab at https://www.npmjs.com/package/@angular-devkit/build-angular, but you can probably guess what tag is appropriate for your version. – Casey Hungler Sep 16 '20 at 00:17
  • Thanks so much "npm i @angular-devkit/build-angular@0.803.24" worked for me. – Ultan Kearns May 03 '21 at 17:46
141

I had this error after npm audit found vulnerabilities in the version of @angular-devkit/build-angular that I was using. I ran npm audit fix which updated it to 0.900.2, but when I ran ng serve it gave the error quoted in the question.

I resolved it by downgrading to version 0.803.25. This was the highest version I could find which did not cause any errors when running ng serve. The vulnerabilities found by npm audit are resolved in this version.

This is the command I ran:

npm i @angular-devkit/build-angular@0.803.25
Tim
  • 5,435
  • 7
  • 42
  • 62
50

I had just created a new project and got this error. Since I had no legacy code I needed to work with and wanted to use the latest (9.0) version of Angular, I ran this command:

ng update @angular/cli @angular/core

and it fixed everything.

Das_Geek
  • 2,775
  • 7
  • 20
  • 26
ColemanTO
  • 839
  • 7
  • 11
  • 10
    Should be the accepted answer since it addresses the most common use case of getting this error. – Snowman Feb 08 '20 at 08:54
5

update @angular-devkit/build-angular version .

1

Try deleting package-lock.json and reinstalling node_modules

1

I had the same issue in Ionic 4 after running "npm audit fix", but npm broke the whole versioning of the dependencies.

I tried doing most of the things listed here but it would fix one problem and create a new one. So the only solution that worked for me was manual dependency handling.

Check out what versions of each package you need in your package.json and package-lock.json (which package version do other packages depend on and expect to find in your project, mine were expecting about three total versions of some files), some will be shown as warnings in your cli after npm installing some packages, but not all will show so do best to manually check.
NB: I found package-lock.json easier for me to read but I would refer to package.json to make sure I was still on the right track.

For me the main package was Ionic itself (@ionic/angular-toolkit was the only package I could find that was connected to angular), so I looked at the version of angular it was expecting and downgraded to that. Then every other package that angular needed also had to be checked. It was a lot of work and spent half a day fixing but it solved all my issues.

  1. An ionic package had this dependencies;
    • @schematics/angular@^8.0.0
    • tslib@^1.9.0
    • ws@^7.0.1

Focusing on the angular package, I decided to
npm install @schematics/angular@8.0.0

  1. That dependency, @schematics/angular@8.0.0, had the following dependencies;

    • @angular-devkit/core@8.0.0
    • @angular-devkit/schematics@8.0.0
  2. The dependency, @angular-devkit/schematics@8.0.0 had the dependencies;

    • @angular-devkit/core@8.0.0
    • rxjs@6.4.0

I did this for all the packages until I could build my app again. But you can just install in one go if you know the versions they require
npm install @schematics/angular@8.0.0 @angular-devkit/core@8.0.0 @angular-devkit/schematics@8.0.0

You can put all the packages in that npm install line if you already know for certain which other packages should be downgraded or upgraded to save time.

Hope this helps anyone who couldn't find a solution from the other comments.

Wylie
  • 350
  • 3
  • 12
0

I was installing ngx-quill and faced the same issue. please make sure to check the supported versions.

For example - If you are using Angular 8, make sure you are installing the supported version. In case of ngx-quill, it will be npm install ngx-quill@5.2.0

Anirban Bhadra
  • 221
  • 3
  • 5
0

I upgraded my ng8 project to ng9 with

ncu -u
Rob Lassche
  • 841
  • 10
  • 16
0

running ng update will tell you what you need to update. then run the commands and you will be good to go

Byron
  • 691
  • 9
  • 9
0

I have fixed this issue using the below command.

npm uninstall @angular-devkit/build-angular
npm install --save-dev @angular-devkit/build-angular
Sathiamoorthy
  • 8,831
  • 9
  • 65
  • 77
0

This works for me:

ng update @angular/cli @angular/core --force
Laurel
  • 5,965
  • 14
  • 31
  • 57
andor
  • 11
  • 1
-1
npm i @angular-devkit/build-angular@0.801.2
double-beep
  • 5,031
  • 17
  • 33
  • 41
Manoj Verma
  • 518
  • 1
  • 5
  • 12