尝试导入错误:'react-lifecycles-compat'不包含默认导出(作为"reactLifecyclesCompat"导入)



./node_modules/reactstrap/dist/reactstrap.es.js

尝试导入错误:"react-lifecycles-compat"不包含默认导出(作为"reactLifecyclesCompat"导入)。

只需npm install --save reactstrap@6.5.0无需删除任何内容即可。干杯!

我现在遇到了同样的错误。我不是专家,但这就是它为我解决的方式。

  1. 检查您的 package.json 中的 reactstrap 版本(我认为最新的是昨天发布的 ^7.0.0。
  2. 在 package.json 中将其更改为 ^6.5.0
  3. 删除节点模块
  4. 重新安装依赖项
  1. 开放式./node_modules/reactstrap/dist/reactstrap.es.js
  2. 从以下行中删除reactLifecyclesCompat,

    import reactLifecyclesCompat, { polyfill } from 'react-lifecycles-compat';

  3. 在以下行中将reactLifecyclesCompat.polyfill更改为polyfill

    var _default = (0, reactLifecyclesCompat.polyfill)(Transition);

最新更新