首页 > 解决方案 > React Boostrap - TypeError:无法读取未定义的属性“bool”

问题描述

我创建了一个新的反应应用程序,反应版本为 16.6.3。我添加了 react-bootstrap 版本 0.28.5。但是,当我运行我的应用程序时,我收到“React Boostrap - TypeError: Cannot read property 'bool' of undefined”错误。

这是 package.json:

"dependencies": {
"@types/react-router-dom": "^4.3.1",
"axios": "^0.18.0",
"babel": "^6.5.2",
"bootstrap": "^3.3.7",
"file-saver": "^2.0.0",
"react": "^16.6.3",
"react-bootstrap": "^0.28.5",
"react-dom": "^16.6.3",
"react-overlays": "^0.7.0",
"react-router": "^3.2.0",
"react-router-dom": "^4.2.2",
"react-scripts-scss-ts": "2.17.1",
"react-search-input": "^0.11.3"

}

我还运行“npm dedupe”来查找任何重复的问题,但没有运气。有什么办法可以解决这个问题吗?

标签: reactjsreact-bootstrap

解决方案


推荐阅读