【发布时间】:2020-10-26 12:29:42
【问题描述】:
从 Angular 8 升级到 10 之后。
运行 -ng serve 命令给我错误 -
node_modules/ngx-tree-select/src/module.d.ts:11:56 中的错误 - 错误 TS2314:通用类型“ModuleWithProviders”需要 1 个类型参数。
11 static forRoot(options: TreeSelectDefaultOptions): ModuleWithProviders; ~~~~~~~~~~~~~~~~~~~
这是我的文件 - 前端/webapp/node_modules/ngx-tree-select/src/module.d.ts
import { ModuleWithProviders } from '@angular/core';
import { TreeSelectDefaultOptions } from './models/tree-select-default-options';
import * as ɵngcc0 from '@angular/core';
import * as ɵngcc1 from './components/tree-select.component';
import * as ɵngcc2 from './components/tree-select-item.component';
import * as ɵngcc3 from './directives/off-click.directive';
import * as ɵngcc4 from './pipes/item.pipe';
import * as ɵngcc5 from '@angular/common';
import * as ɵngcc6 from '@angular/forms';
export declare class NgxTreeSelectModule {
static forRoot(options: TreeSelectDefaultOptions): ModuleWithProviders;
static ɵmod: ɵngcc0.ɵɵNgModuleDefWithMeta<NgxTreeSelectModule, [typeof ɵngcc1.TreeSelectComponent, typeof ɵngcc2.TreeSelectItemComponent, typeof ɵngcc3.OffClickDirective, typeof ɵngcc4.ItemPipe], [typeof ɵngcc5.CommonModule, typeof ɵngcc6.FormsModule], [typeof ɵngcc1.TreeSelectComponent]>;
static ɵinj: ɵngcc0.ɵɵInjectorDef<NgxTreeSelectModule>;
}
//# sourceMappingURL=module.d.ts.map
请查看错误图片。
【问题讨论】:
-
你解决了这个问题吗?从 9 升级到 10 后面临同样的问题
-
我在这个问题上没有任何解决方案。每当我运行 ng server 时,我都会收到很多与 ngx-tree-select @MuhmmadAbubakarIkram 相关的错误
-
我知道 ngx-bootstrap 现在与 angular 10 不兼容,6.0.0 版本的 ngx-bootstrap 将与 angular 10 兼容,请参阅此线程以获取有关该问题的更多详细信息,我到目前为止,使用 github github.com/valor-software/ngx-bootstrap/issues/… 上的此评论中提供的建议解决了该问题
标签: angular