我在我的Angular 7项目中使用ngx-bootstrap并且我想更新到8.0.0-beta.7只是为了检查新版本但是我从ngx-bootstrap timepicker组件收到错误
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'.
node_modules/ngx-bootstrap/timepicker/models/index.d.ts(3,22): error TS2307: Cannot find module '@angular/core/src/type'.
有什么方法可以对此做些什么,这样我就可以查看新的Angular 8 Beta。
已经安装ngx-bootstrap
到Angular 8.0-beta警告时出现。
npm WARN [email protected] requires a peer of @angular/common@>=6.0.0 but none is installed...
npm WARN [email protected] requires a peer of @angular/core@>=6.0.0 but none is installed...
此时您无法在没有错误的情况下运行应用程序,因为Angular 8中的结构已更改。
例如:
error TS2307: Cannot find module '@angular/forms/src/directives/control_value_accessor'.
src
目录现在不再存在,现在它可以从这条路径导入@angular/forms
你能用它做什么
留在Angular 7.x.x - 稳定并等待ngx-bootstrap更新
要么
在更新了几条路径之后,它开始工作的错误。但我不建议这样做。