./node_modules/reactstrap/dist/reactstrap.es.js
尝试导入错误:"react-lifecycles-compat"不包含默认导出(作为"reactLifecyclesCompat"导入)。
只需npm install --save reactstrap@6.5.0
无需删除任何内容即可。干杯!
我现在遇到了同样的错误。我不是专家,但这就是它为我解决的方式。
- 检查您的 package.json 中的 reactstrap 版本(我认为最新的是昨天发布的 ^7.0.0。
- 在 package.json 中将其更改为 ^6.5.0
- 删除节点模块
- 重新安装依赖项
- 开放式
./node_modules/reactstrap/dist/reactstrap.es.js
-
从以下行中删除
reactLifecyclesCompat,
:import reactLifecyclesCompat, { polyfill } from 'react-lifecycles-compat';
-
在以下行中将
reactLifecyclesCompat.polyfill
更改为polyfill
:var _default = (0, reactLifecyclesCompat.polyfill)(Transition);