当前位置: 首页 > 工具软件 > ngx-bootstrap > 使用案例 >

angular4引入ngx-bootstrap 出现 Metadata version mismatch for module

颛孙嘉石
2023-12-01

问题:
ERROR in Error: Metadata version mismatch for module F:/nodejs/angular4/mybootst
rap3/node_modules/@ng-bootstrap/ng-bootstrap/index.d.ts, found version 4, expect
ed 3, resolving symbol AppModule in F:/nodejs/angular4/mybootstrap3/src/app/app.
module.ts, resolving symbol AppModule in F:/nodejs/angular4/mybootstrap3/src/app
/app.module.ts
原因:
angular与ngx-bootstrap版本不兼容造成的
解决方案
1、npm show ngx-bootstrap@* version
查看所有版本
2、npm i ngx-bootstrap@2.0.0
安装低版本的ngx-bootstrap,我的angular4与ngx-bootstrap 2.0完美运行!

 类似资料: