NPM审核固定角度10.0.1之后的错误 [英] Errors after npm audit fix angular 10.0.1
本文介绍了NPM审核固定角度10.0.1之后的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我今天运行了这个较老的10.0.1角度项目,它告诉我它有很多低漏洞,而有些高漏洞.所以我运行了npm审核修复程序来修复它们.但是现在当我尝试运行它时,它给了我这些错误:
I ran this older 10.0.1 angular project today, and it told me it had a lot of low vulnerabilities and a few high ones. so i ran npm audit fix to fix them. but now when I try to run it, it gives me these errors:
Error: ./src/main.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
TypeError: angularCompiler.getResourceDependencies(...) is not a function or its return value is not iterable
at getDependencies (C:\Web\vgc\vgc\node_modules\@ngtools\webpack\src\ivy\plugin.js:261:56)
at C:\Web\vgc\vgc\node_modules\@ngtools\webpack\src\ivy\plugin.js:374:20
at analyzingFileEmitter (C:\Web\vgc\vgc\node_modules\@ngtools\webpack\src\ivy\plugin.js:307:20)
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: ./src/polyfills.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
TypeError: angularCompiler.getResourceDependencies(...) is not a function or its return value is not iterable
at getDependencies (C:\Web\vgc\vgc\node_modules\@ngtools\webpack\src\ivy\plugin.js:261:56)
at C:\Web\vgc\vgc\node_modules\@ngtools\webpack\src\ivy\plugin.js:374:20
at analyzingFileEmitter (C:\Web\vgc\vgc\node_modules\@ngtools\webpack\src\ivy\plugin.js:307:20)
at process._tickCallback (internal/process/next_tick.js:68:7)
有什么办法解决此问题吗?我真的无法在线找到任何相关问题或解决方案.
Any ideas how to fix this? I couldn't really find any relatable problems or solutions online.
推荐答案
将Angular CLI从10升级到11对我而言是可行的.
Upgrading the Angular CLI from 10 to 11 works for me.
ng update @angular/core @angular/cli
ng update
这篇关于NPM审核固定角度10.0.1之后的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文