安装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
(0)

相关推荐