gpt4 book ai didi

angular - 'formDirective' 被定义为类 'ControlContainer' 中的访问器,但在 'ConnectArrayDirective' 中作为实例属性被覆盖

转载 作者:行者123 更新时间:2023-12-05 04:58:56 25 4
gpt4 key购买 nike

将 angular 9 更新到最新版本后(“@angular/core”:“~11.0.0-next.0”,)。我收到以下错误,但是,我已经更新了最新版本的 @angular-redux/form、@angular-redux/router 和 @angular-redux/store

"@angular-redux/form": "^10.0.0",
"@angular-redux/router": "^10.0.0",
"@angular-redux/store": "^10.0.0",

Angular 更新

"@angular/common": "~11.0.0-next.0",
"@angular/compiler": "~11.0.0-next.0",
"@angular/core": "~11.0.0-next.0",
"@angular/forms": "~11.0.0-next.0",

错误

 ERROR in node_modules/@angular-redux/form/connect-array/connect-array.directive.d.ts:22:14 - error TS2610: 'formDirective' is defined as an accessor in class 'ControlContainer', but is overridden here in 'ConnectArrayDirective' as an instance property.

22 readonly formDirective: FormGroupDirective;
~~~~~~~~~~~~~
node_modules/@angular-redux/form/connect-array/connect-array.directive.d.ts:23:14 - error TS2610: 'path' is defined as an accessor in class 'ControlContainer', but is overridden here in 'ConnectArrayDirective' as an instance property.

23 readonly path: string[];

最佳答案

这些库不再维护,检查this repo

作为升级项目时的解决方法,我在 tsconfig.json 内的 compilerOptions 中设置了 "skipLibCheck": true,如下所示:

{
...,
"compilerOptions": {
...,
...,
"skipLibCheck": true,
...,
...
},
"angularCompilerOptions": {
...
}
}

关于angular - 'formDirective' 被定义为类 'ControlContainer' 中的访问器,但在 'ConnectArrayDirective' 中作为实例属性被覆盖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63772910/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com