简体   繁体   English

发生未处理的异常:作业名称“..getProjectMetadata”不存在

[英]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 .我有这些版本: Angular CLI: 8.3.19Node: 12.14.0

Any Idea what causes this problem?知道是什么导致了这个问题吗?

It seems to be a problem with @angular-devkit/build-angular. @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.npm audit发现我使用的@angular-devkit/build-angular版本中存在漏洞后,我遇到了这个错误。 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.我运行npm audit fix其更新为0.900.2 ,但是当我运行ng serve它给出了问题中引用的错误。

I resolved it by downgrading to version 0.803.25 .我通过降级到版本0.803.25解决了它。 This was the highest version I could find which did not cause any errors when running ng serve .这是我能找到的最高版本,它在运行ng serve时不会导致任何错误。 The vulnerabilities found by npm audit are resolved in this version. npm audit发现的漏洞在这个版本中得到解决。

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:由于我没有需要使用的遗留代码并且想使用最新的 (9.0) 版本的 Angular,我运行了这个命令:

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.运行“npm 审计修复”后,我在 Ionic 4 中遇到了同样的问题,但 npm 破坏了依赖项的整个版本控制。

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.在 package.json 和 package-lock.json 中查看您需要的每个包的版本(其他包依赖哪个包版本并期望在您的项目中找到,我的期望某些文件的总共三个版本),一些在 npm 安装某些软件包后,将在您的 cli 中显示为警告,但并非所有软件包都会显示,因此最好手动检查。
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.注意:我发现 package-lock.json 更容易阅读,但我会参考 package.json 以确保我仍然在正确的轨道上。

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.对我来说,主要包是 Ionic 本身(@ionic/angular-toolkit 是我能找到的唯一与 angular 相关的包),所以我查看了它期望的 angular 版本并降级到那个版本。 Then every other package that angular needed also had to be checked.然后还必须检查 angular 需要的所有其他包。 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 @原理图/角度@^8.0.0
    • tslib@^1.9.0 tslib@^1.9.0
    • ws@^7.0.1 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 ;该依赖项@schematics/angular@8.0.0 具有以下依赖项

    • @angular-devkit/core@8.0.0 @angular-devkit/core@8.0.0
    • @angular-devkit/schematics@8.0.0 @angular-devkit/schematics@8.0.0

  2. The dependency, @angular-devkit/schematics@8.0.0 had the dependencies ;依赖,@angular-devkit/schematics@8.0.0 有依赖

    • @angular-devkit/core@8.0.0 @angular-devkit/core@8.0.0
    • rxjs@6.4.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.如果您已经确定应该降级或升级哪些其他软件包以节省时间,则可以将所有软件包放在该 npm install 行中。

Hope this helps anyone who couldn't find a solution from the other comments.希望这可以帮助那些无法从其他评论中找到解决方案的人。

I was installing ngx-quill and faced the same issue.我正在安装 ngx-quill 并面临同样的问题。 please make sure to check the supported versions.请务必检查支持的版本。

For example - If you are using Angular 8, make sure you are installing the supported version.例如 - 如果您使用的是 Angular 8,请确保您安装的是受支持的版本。 In case of ngx-quill, it will be npm install ngx-quill@ 5.2.0在 ngx-quill 的情况下,它将是 npm install ngx-quill@ 5.2.0

我将我的 ng8 项目升级到 ng9

ncu -u

running ng update will tell you what you need to update.运行ng 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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 发生未处理的异常:脚本文件../node_modules/chart.js 不存在 - An unhandled exception occurred: Script file ../node_modules/chart.js does not exist 发生未处理的异常:文件替换中的 \environments\environment.prod.ts 路径不存在 - An unhandled exception occurred: \environments\environment.prod.ts path in file replacements does not exist Angular 14 发生未处理的异常:脚本文件 node_modules/tinymce/themes/modern/theme.min.js 不存在 - Angular 14 An unhandled exception occurred: Script file node_modules/tinymce/themes/modern/theme.min.js does not exist 运行 ng serve 发生未处理的异常 - Unhandled exception occurred running ng serve 发生未处理的异常:无法读取未定义的属性“减号” - An unhandled exception occurred: Cannot read property 'Minus' of undefined 发生未处理的异常:找不到模块 './features/colr-v1' - An unhandled exception occurred: Cannot find module './features/colr-v1' 未处理的拒绝错误:关系'dbname'不存在 - Unhandled rejection error: relation 'dbname' does not exist 未处理的拒绝 SequelizeDatabaseError:关系“用户”不存在 - Unhandled rejection SequelizeDatabaseError: relation "users" does not exist 如何解决“未处理的拒绝SequelizeDatabaseError:关系“ ABC”不存在”? - How to fix “Unhandled rejection SequelizeDatabaseError: relation ”ABC“ does not exist”? 发生未处理的异常:找不到模块“@angular-devkit/build-angular” - An unhandled exception occurred: Could not find module "@angular-devkit/build-angular"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM