我正在学习关于 Udemy 的课程(https://www.udemy.com/course/build-an-app-with-aspnet-core-and-angular-from-scratch),到目前为止,一切都很好,直到我尝试安装 ngx-bootstrap 。
我安装npm install ngx-bootstrap --save在一个Angular9项目上并ng build收到以下错误:
Compiling ngx-bootstrap : es2015 as esm2015
ERROR in Failed to find exported name of node (class ButtonRadioGroupDirective {
constructor(cdr) {
this.cdr = cdr;
this.onChange = Function.prototype;
this.onTouched = Function.prototype;
}
get value() {
return this._value;
}
set value(value) {
this._value = value;
}
writeValue(value) {
this._value = value;
this.cdr.markForCheck();
}
registerOnChange(fn) {
this.onChange = fn;
}
registerOnTouched(fn) {
this.onTouched = fn;
}
}) in 'C:/Dev/DatingApp/DatingApp-SPA/node_modules/ngx-bootstrap/bundles/ngx-bootstrap.es2015.js'.
我遇到了以前的问题,我可以在这里找到解决方案:https ://github.com/valor-software/ngx-bootstrap/issues/5242
不确定它是否相关,但会分享以防万一:
ERROR in The target entry-point "ngx-bootstrap" has missing dependencies:
- @angular/forms/src/directives/control_value_accessor
- @angular/core/src/type
感谢您的帮助!并让我知道我是否应该证明任何其他信息。
ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 9.0.3
Node: 12.16.1
OS: win32 x64
Angular: 9.0.2
... animations, common, compiler, compiler-cli, core
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.900.3
@angular-devkit/build-angular 0.900.3
@angular-devkit/build-optimizer 0.900.3
@angular-devkit/build-webpack 0.900.3
@angular-devkit/core 9.0.3
@angular-devkit/schematics 9.0.3
@angular/cli 9.0.3
@angular/forms 9.0.5
@ngtools/webpack 9.0.3
@schematics/angular 9.0.3
@schematics/update 0.900.3
rxjs 6.5.4
typescript 3.7.5
webpack 4.41.2