简体   繁体   中英

An unhandled exception occurred: Job name "..getProjectMetadata" does not exist

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?

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

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

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.

更新@angular-devkit/build-angular 版本。

尝试删除package-lock.json并重新安装node_modules

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.

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.

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

我将我的 ng8 项目升级到 ng9

ncu -u

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

I have fixed this issue using the below command.

npm uninstall @angular-devkit/build-angular
npm install --save-dev @angular-devkit/build-angular

这对我有用:

ng update @angular/cli @angular/core --force
npm i @angular-devkit/build-angular@0.801.2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM