Reactjs I';我在升级react、redux版本后出现此错误

Reactjs I';我在升级react、redux版本后出现此错误,reactjs,redux,react-redux,react-router,connected-react-router,Reactjs,Redux,React Redux,React Router,Connected React Router,我已经更新了react版本。从react路由器redux跳到连接的react路由器。下面提供package.json文件。 大多数情况下,这是在升级了最新版本之后发生的。 所以得到下面的错误 index.js:31 Uncaught TypeError: Cannot read property 'string' of undefined at Object.<anonymous> (index.js:31) at __webpack_require__ (boots

我已经更新了react版本。从react路由器redux跳到连接的react路由器。下面提供package.json文件。 大多数情况下,这是在升级了最新版本之后发生的。 所以得到下面的错误

index.js:31 Uncaught TypeError: Cannot read property 'string' of undefined
    at Object.<anonymous> (index.js:31)
    at __webpack_require__ (bootstrap 57766baaa3c8c796877e:555)
    at fn (bootstrap 57766baaa3c8c796877e:86)
    at Object.<anonymous> (Deposit.jsx:15)
    at __webpack_require__ (bootstrap 57766baaa3c8c796877e:555)
    at fn (bootstrap 57766baaa3c8c796877e:86)
    at Object.<anonymous> (MyAccount.jsx:41)
    at __webpack_require__ (bootstrap 57766baaa3c8c796877e:555)
    at fn (bootstrap 57766baaa3c8c796877e:86)
    at Object.<anonymous> (index.js:1)
(anonymous) @ index.js:31
__webpack_require__ @ bootstrap 57766baaa3c8c796877e:555
fn @ bootstrap 57766baaa3c8c796877e:86
(anonymous) @ Deposit.jsx:15
__webpack_require__ @ bootstrap 57766baaa3c8c796877e:555
fn @ bootstrap 57766baaa3c8c796877e:86
(anonymous) @ MyAccount.jsx:41
__webpack_require__ @ bootstrap 57766baaa3c8c796877e:555
fn @ bootstrap 57766baaa3c8c796877e:86
(anonymous) @ index.js:1
__webpack_require__ @ bootstrap 57766baaa3c8c796877e:555
fn @ bootstrap 57766baaa3c8c796877e:86
(anonymous) @ index.js:12
__webpack_require__ @ bootstrap 57766baaa3c8c796877e:555
fn @ bootstrap 57766baaa3c8c796877e:86
(anonymous) @ bootstrap 57766baaa3c8c796877e:578
__webpack_require__ @ bootstrap 57766baaa3c8c796877e:555
(anonymous) @ bootstrap 57766baaa3c8c796877e:578
(anonymous) @ bootstrap 57766baaa3c8c796877e:578
}“依赖项”:{ “已连接的路由器”:“^6.9.1”, “电子是发展”:“0.3.0”, “历史记录”:“^5.0.0” },

如何解决这个问题

来源:

基于ReactJS文档/教程页面,您似乎正在尝试使用旧方法访问
PropTypes

这是第一个错误,但您还需要更改其他错误

请尝试使用此选项:

import PropTypes from 'prop-types';

propTypes: {
    content: PropTypes.string.isRequired
    //Add the remaining ones
};

index.js的第31行发生了什么?你能粘贴stacktrace列出的代码吗?@AndreaCostanzo1嘿,我上传了index.js的屏幕截图。记住,最好避免堆栈溢出中的代码屏幕截图。始终将实际代码正确格式化。这是否回答了您的问题?你解决问题了吗?
import PropTypes from 'prop-types';

propTypes: {
    content: PropTypes.string.isRequired
    //Add the remaining ones
};