Yas*_* AY 0 angular-material ng-bootstrap angular
Compiling @ng-bootstrap/ng-bootstrap : module as esm5
Error: Error on worker #1: Error: Failed to compile entry-point @ng-bootstrap/ng-bootstrap (module as esm5) due to compilation errors:
node_modules/@ng-bootstrap/ng-bootstrap/rating/rating.js:148:43 - error NG1006: Cannot combine @Input decorators with query decorators
148 "starTemplate": [{ type: Input }, { type: ContentChild, args: [TemplateRef,] },],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@ng-bootstrap/ng-bootstrap/rating/rating.module.js:12:51 - error NG6001: The class 'NgbRating' is listed in the declarations of the
NgModule 'NgbRatingModule', but is not a directive, a component, or a pipe. Either remove it from the NgModule's declarations, or add an appropriate Angular decorator.
12 { type: NgModule, args: [{ declarations: [NgbRating], exports: [NgbRating], imports: [CommonModule] },] },
~~~~~~~~~
node_modules/@ng-bootstrap/ng-bootstrap/rating/rating.js:14:5
14 var NgbRating = /** @class */ (function () {
~~~~~~~~~
'NgbRating' is declared here.
node_modules/@ng-bootstrap/ng-bootstrap/rating/rating.js:14:5 - error NG6003: Appears in the NgModule.exports of NgbRatingModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class.
Run Code Online (Sandbox Code Playgroud)
它是否缺少 Angular 注释?
14 var NgbRating = /** @class */ (function () {
~~~~~~~~~
node_modules/@ng-bootstrap/ng-bootstrap/rating/rating.module.js:7:5 - error NG6002: Appears in the NgModule.imports of NgbRootModule, but itself
has errors
7 var NgbRatingModule = /** @class */ (function () {
~~~~~~~~~~~~~~~
node_modules/@ng-bootstrap/ng-bootstrap/rating/rating.module.js:7:5 - error NG6003: Appears in the NgModule.exports of NgbRootModule, but itself
has errors
7 var NgbRatingModule = /** @class */ (function () {
~~~~~~~~~~~~~~~
node_modules/@ng-bootstrap/ng-bootstrap/rating/rating.module.js:7:5 - error NG6002: Appears in the NgModule.imports of NgbModule, but itself has
errors
7 var NgbRatingModule = /** @class */ (function () {
~~~~~~~~~~~~~~~
node_modules/@ng-bootstrap/ng-bootstrap/rating/rating.module.js:7:5 - error NG6003: Appears in the NgModule.exports of NgbModule, but itself has
errors
7 var NgbRatingModule = /** @class */ (function () {
~~~~~~~~~~~~~~~
at ClusterWorker.compile (C:\Users\adduru.yeswanth\Tool Front End\tools\node_modules\@angular\compiler-cli\ngcc\src\main.js:178:27)
at Worker.<anonymous> (C:\Users\adduru.yeswanth\Tool Front End\tools\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\worker.js:44:42)
at Worker.emit (events.js:182:13)
at process.Worker.process.on (internal/cluster/worker.js:28:12)
at process.emit (events.js:182:13)
at emit (internal/child_process.js:812:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
at ClusterMaster.onWorkerMessage (C:\Users\adduru.yeswanth\Tool Front End\tools\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:165:27)
at C:\Users\adduru.yeswanth\Tool Front End\tools\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:49:95
at ClusterMaster.<anonymous> (C:\Users\adduru.yeswanth\Tool Front End\tools\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:245:57)
at step (C:\Users\adduru.yeswanth\Tool Front End\tools\node_modules\tslib\tslib.js:139:27)
at Object.next (C:\Users\adduru.yeswanth\Tool Front End\tools\node_modules\tslib\tslib.js:120:57)
at C:\Users\adduru.yeswanth\Tool Front End\tools\node_modules\tslib\tslib.js:113:75
at new Promise (<anonymous>)
at Object.__awaiter (C:\Users\adduru.yeswanth\Tool Front End\tools\node_modules\tslib\tslib.js:109:16)
at EventEmitter.<anonymous> (C:\Users\adduru.yeswanth\Tool Front End\tools\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:239:32)
at EventEmitter.emit (events.js:182:13)
An unhandled exception occurred: NGCC failed.
See "C:\Users\ADDURU~1.YES\AppData\Local\Temp\ng-RAy48O\angular-errors.log" for further details.
Run Code Online (Sandbox Code Playgroud)
小智 7
@Iolabs,是的,这就是答案。并为我工作,并进行了一些调整。
好吧,我npm install @ng-bootstrap/ng-bootstrap
在 CLI上采用了类似的方法,但遇到了同样的问题。然后我尝试通过 npm 安装,仍然得到了类似的结果。
但是,我注意到当我再次使用 ng add 时,出现了一个新错误:
您尝试添加的包不支持原理图。您可以尝试使用不同版本的软件包或联系软件包作者以添加 ng-add 支持。
然后我: npm uninstall @ng-bootstrap/ng-bootstrap
并跑了: ng add @ng-bootstrap/ng-bootstrap
并且包像魅力一样工作仍然不确定包是如何破坏的。
另一件事:确保删除NgbModule.forRoot(),如果您正在使用angular9.x.x
| 归档时间: |
|
| 查看次数: |
4491 次 |
| 最近记录: |