安装react-redux后编译报错

 

安装了react-redux后,npm start报下面错误

  Failed to compile.

./node_modules/_react-redux@7.2.0@react-redux/es/connect/mapDispatchToProps.js
Module not found: Can't resolve 'redux' in 'E:\***\node_modules\_react-redux@7.2.0@react-redux\es\connect'

解决如下:

react-redux插件是基于redux的,必须先安装redux先再使用react-redux

npm install –save redux

 

posted @ 2020-07-01 14:00  Jade_g  阅读(832)  评论(0编辑  收藏  举报