我是React的新手。。
这个错误来自浏览器控制台,当我试图显示它时,我也在按照这里的教程使用django-rest框架。在尝试在我的应用程序中实现redux时,我遇到了这个错误。我不知道我错过了哪一部分。
Uncaught Error: Cannot find module 'redux'
at webpackMissingModule (mapDispatchToProps.js:8)
at eval (mapDispatchToProps.js:8)
at Object../node_modules/react-redux/es/connect/mapDispatchToProps.js (main.js :452)
at __webpack_require__ (main.js :999)
at eval (connect.js:10)
at Object../node_modules/react-redux/es/connect/connect.js (main.js :434)
at __webpack_require__ (main.js :999)
at eval (index.js:19)
at Object../node_modules/react-redux/es/index.js (main.js :626)
at __webpack_require__ (main.js :999)
webpackMissingModule @ mapDispatchToProps.js:8
eval @ mapDispatchToProps.js:8
./node_modules/react-redux/es/connect/mapDispatchToProps.js @ main.js :452
__webpack_require__ @ main.js :999
eval @ connect.js:10
./node_modules/react-redux/es/connect/connect.js @ main.js :434
__webpack_require__ @ main.js :999
eval @ index.js:19
./node_modules/react-redux/es/index.js @ main.js :626
__webpack_require__ @ main.js :999
eval @ App.js:6
./leadmanager/frontend/src/components/App.js @ main.js :52
__webpack_require__ @ main.js :999
eval @ index.js:2
./leadmanager/frontend/src/index.js @ main.js :129
__webpack_require__ @ main.js :999
(anonymous) @ main.js :1049
(anonymous) @ main.js :1051
:8001/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
您安装了redux吗?react redux和redux是两个不同的包,一个是用于与react集成,另一个是库本身,请检查redux包是否在node_modules文件夹中,如果没有,请尝试安装它。