英文:
ESLint: Error: Failed to load config "plugin:@angular-eslint/ng-cli-compat" to extend from
问题
我尝试将Angular项目从版本15更新到16,现在出现了许多我无法理解的错误。 IntelliJ在顶部显示以下错误:
我不知道它是否相关,但运行ng serve也失败了,出现了许多模块错误,我无法真正看出问题在哪。主要是这样说的:
NG6002:此导入包含错误,可能会影响依赖于此NgModule的组件。
是否有人有建议如何修复这个问题?
英文:
I have tried updating an Angular project from version 15 to 16, now I get several errors that I can't make sense of. IntelliJ shows the following error at the top:
I don't know if it's related, but running ng serve also fails with many module errors where I can't really see what's wrong. Mostly it says
NG6002: This import contains errors, which may affect components that depend on this NgModule.
does anyone have a suggestion how to fix that?
答案1
得分: 7
I just removed the references to the below plugins in .eslint.json under extends section:
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
and added the below:
"plugin:@angular-eslint/recommended"
The extends now looks as below:
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
英文:
I just removed the references to the below plugins in .eslint.json under extends section
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
and added the below
"plugin:@angular-eslint/recommended"
The extends now looks as below
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
答案2
得分: 4
ng-cli-compat
已移除,您需要按照这里的说明进行操作:https://github.com/angular-eslint/angular-eslint/issues/1353#issuecomment-1529924573
英文:
ng-cli-compat
was removed you have to follow instructions here: https://github.com/angular-eslint/angular-eslint/issues/1353#issuecomment-1529924573
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论