3

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

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

角度更新

"@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[];
4

1 回答 1

0

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

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

{
  ...,
  "compilerOptions": {
    ...,
    ...,
    "skipLibCheck": true,
    ...,
    ...
  },
  "angularCompilerOptions": {
    ...
  }
}
于 2021-02-18T12:23:31.127 回答