由于编译错误,无法编译入口点@ng-bootstrap/ng-bootstrap(`es2015` 作为 esm2015)
Failed to compile entry-point @ng-bootstrap/ng-bootstrap (`es2015` as esm2015) due to compilation errors
有人可以帮我解决下面给出的这些错误吗?
我正在将我的 angular 项目从版本 8 升级到 12。首先,我按“7 到 8、8 到 9”版本升级,但是在版本 9 时我遇到了很多错误不相容的依赖。我花了很多时间,但没有用。所以我尝试升级到最新版本。现在我只是收到这些错误。
ERROR in Failed to compile entry-point @ng-bootstrap/ng-bootstrap (`es2015` as esm2015) due to compilation errors:
node_modules/@ng-bootstrap/ng-bootstrap/fesm2015/ng-bootstrap.js:7538:37 - error NG1006: Cannot combine @Input decorators with query decorators
7538 starTemplate: [{ type: Input }, { type: ContentChild, args: [TemplateRef,] }],
node_modules/@ng-bootstrap/ng-bootstrap/fesm2015/ng-bootstrap.js:7559:47 - error NG6001: The class 'NgbRating' is listed in the declarations of the NgModule 'NgbRatingModule', but is not a directive, a component, or
7559 { type: NgModule, args: [{ declarations: [NgbRating], exports: [NgbRating], imports: [CommonModule] },] }
node_modules/@ng-bootstrap/ng-bootstrap/fesm2015/ng-bootstrap.js:7332:7
7332 class NgbRating {
'NgbRating' is declared here.
node_modules/@ng-bootstrap/ng-bootstrap/fesm2015/ng-bootstrap.js:7332:7 - error NG6003: Appears in the NgModule.exports of NgbRatingModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class.
Is it missing an Angular annotation?
7332 class NgbRating {
node_modules/@ng-bootstrap/ng-bootstrap/fesm2015/ng-bootstrap.js:7548:7 - error NG6002: Appears in the NgModule.imports of NgbModule, but itself has errors
7548 class NgbRatingModule {
node_modules/@ng-bootstrap/ng-bootstrap/fesm2015/ng-bootstrap.js:7548:7 - error NG6003: Appears in the NgModule.exports of NgbModule, but itself has errors
7548 class NgbRatingModule {
这是我点击“ng --version
”时的结果。
Angular CLI: 12.2.1
Node: 14.17.0
Package Manager: npm 7.20.5
OS: win32 x64
Angular: 13.0.0-next.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.901.15
@angular-devkit/build-angular 0.901.15
@angular-devkit/core 9.1.15
@angular-devkit/schematics 12.2.1
@angular/cdk 12.2.1
@angular/cli 12.2.1
@schematics/angular 12.2.1
rxjs 6.6.7
typescript 4.3.5
更新未正确完成。
您必须耐心地更新并解决依赖性问题。
迁移到 v9 会导致很多问题。所以你可能想先尝试解决依赖性问题,然后再转向更高的 ng 版本。
如果您使用强制标志执行此操作,事情可能无法正常工作。
您必须升级 npm i @ng-bootstrap/ng-bootstrap
无论你在 Angular select ng-bootstrap 哪个版本
运行这个
npm i @ng-bootstrap/ng-bootstrap@10.0.0
支持的版本是:
ng-bootstrap Angular Bootstrap CSS
1.x.x 5.0.2 4.0.0
2.x.x 6.0.0 4.0.0
3.x.x 6.1.0 4.0.0
4.x.x 7.0.0 4.0.0
5.x.x 8.0.0 4.3.1
6.x.x 9.0.0 4.4.1
7.x.x,8.x.x 10.0.0 4.5.0
9.0.0 11.0.0 4.5.0
10.0.0 12.0.0 4.5.0
11.0.0 13.0.0 4.6.0
12.0.0-beta.x 13.0.0 5.0.0
有人可以帮我解决下面给出的这些错误吗?
我正在将我的 angular 项目从版本 8 升级到 12。首先,我按“7 到 8、8 到 9”版本升级,但是在版本 9 时我遇到了很多错误不相容的依赖。我花了很多时间,但没有用。所以我尝试升级到最新版本。现在我只是收到这些错误。
ERROR in Failed to compile entry-point @ng-bootstrap/ng-bootstrap (`es2015` as esm2015) due to compilation errors:
node_modules/@ng-bootstrap/ng-bootstrap/fesm2015/ng-bootstrap.js:7538:37 - error NG1006: Cannot combine @Input decorators with query decorators
7538 starTemplate: [{ type: Input }, { type: ContentChild, args: [TemplateRef,] }],
node_modules/@ng-bootstrap/ng-bootstrap/fesm2015/ng-bootstrap.js:7559:47 - error NG6001: The class 'NgbRating' is listed in the declarations of the NgModule 'NgbRatingModule', but is not a directive, a component, or
7559 { type: NgModule, args: [{ declarations: [NgbRating], exports: [NgbRating], imports: [CommonModule] },] }
node_modules/@ng-bootstrap/ng-bootstrap/fesm2015/ng-bootstrap.js:7332:7
7332 class NgbRating {
'NgbRating' is declared here.
node_modules/@ng-bootstrap/ng-bootstrap/fesm2015/ng-bootstrap.js:7332:7 - error NG6003: Appears in the NgModule.exports of NgbRatingModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class.
Is it missing an Angular annotation?
7332 class NgbRating {
node_modules/@ng-bootstrap/ng-bootstrap/fesm2015/ng-bootstrap.js:7548:7 - error NG6002: Appears in the NgModule.imports of NgbModule, but itself has errors
7548 class NgbRatingModule {
node_modules/@ng-bootstrap/ng-bootstrap/fesm2015/ng-bootstrap.js:7548:7 - error NG6003: Appears in the NgModule.exports of NgbModule, but itself has errors
7548 class NgbRatingModule {
这是我点击“ng --version
”时的结果。
Angular CLI: 12.2.1
Node: 14.17.0
Package Manager: npm 7.20.5
OS: win32 x64
Angular: 13.0.0-next.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.901.15
@angular-devkit/build-angular 0.901.15
@angular-devkit/core 9.1.15
@angular-devkit/schematics 12.2.1
@angular/cdk 12.2.1
@angular/cli 12.2.1
@schematics/angular 12.2.1
rxjs 6.6.7
typescript 4.3.5
更新未正确完成。 您必须耐心地更新并解决依赖性问题。 迁移到 v9 会导致很多问题。所以你可能想先尝试解决依赖性问题,然后再转向更高的 ng 版本。 如果您使用强制标志执行此操作,事情可能无法正常工作。
您必须升级 npm i @ng-bootstrap/ng-bootstrap
无论你在 Angular select ng-bootstrap 哪个版本
运行这个
npm i @ng-bootstrap/ng-bootstrap@10.0.0
支持的版本是:
ng-bootstrap Angular Bootstrap CSS
1.x.x 5.0.2 4.0.0
2.x.x 6.0.0 4.0.0
3.x.x 6.1.0 4.0.0
4.x.x 7.0.0 4.0.0
5.x.x 8.0.0 4.3.1
6.x.x 9.0.0 4.4.1
7.x.x,8.x.x 10.0.0 4.5.0
9.0.0 11.0.0 4.5.0
10.0.0 12.0.0 4.5.0
11.0.0 13.0.0 4.6.0
12.0.0-beta.x 13.0.0 5.0.0