Code Bye

ABP Cannot find module @angular/forms/src/directives/control_value_accessor

ABP网站下载了一个基于 Asp Net Core 、 Angular 的项目代码模板,版本 “version”: “4.7.0”,

按照文档说明 npm start 编译运行时,报错:

ERROR in node_modules/ngx-bootstrap/timepicker/models/index.d.ts(2,38): error TS2307: Cannot find module '@angular/forms/src/directives/control_value_accessor'.
import { ControlValueAccessor } from '@angular/forms/src/directives/control_value_accessor';
node_modules/ngx-bootstrap/timepicker/models/index.d.ts(3,22): error TS2307: Cannot find module '@angular/core/src/type'.
import { Type } from '@angular/core/src/type';

经搜索,解决方案如下:
1、展开web 项目,找到 package.json 修改 “ngx-bootstrap”: “^3.0.0”, 为 “ngx-bootstrap”: “^4.3.0”,
2、重新执行 npm start 即可。结果显示 : Compiled successfully.

问题原因应该是升级Angular: 8后导致。具体未详查。


CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明ABP Cannot find module @angular/forms/src/directives/control_value_accessor