安装react-redux后编译报错

 

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

  Failed to compile.

./node_modules/[email protected]@react-redux/es/connect/mapDispatchToProps.js
Module not found: Can't resolve 'redux' in 'E:\***\node_modules\[email protected]@react-redux\es\connect'

解决如下:

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

npm install –save redux

 

你可能感兴趣的:(安装react-redux后编译报错)