my package.json includes
"prop-types": "^15.6.0",
"react": "^16.1.0",
"react-dom": "^16.1.0",
"react-html-email": "^3.0.0",
"react-redux": "^4.4.5",
"react-route": "^1.0.3",
"react-router": "^3.2.0",
"react-router-dom": "^4.2.2",
"react-router-redux": "4.0.4",
"redux": "3.5.2",
"redux-thunk": "2.0.1",
和index.js上的导入提供程序 从' react-redux'导入{Provider} 弹出错误
storeShape.js:7 Uncaught TypeError: Cannot read property 'shape' of undefined
at Object.<anonymous> (storeShape.js:7)
at __webpack_require__ (bootstrap 6f1183e2a6794c3bb2e7:555)
at fn (bootstrap 6f1183e2a6794c3bb2e7:86)
at Object.<anonymous> (Provider.js:8)
at Object.<anonymous> (bundle.js:51889)
at __webpack_require__ (bootstrap 6f1183e2a6794c3bb2e7:555)
at fn (bootstrap 6f1183e2a6794c3bb2e7:86)
at Object.<anonymous> (index.js:6)
at __webpack_require__ (bootstrap 6f1183e2a6794c3bb2e7:555)
at fn (bootstrap 6f1183e2a6794c3bb2e7:86)
我只做了一次改变,我是redux的新手,所以请帮助
答案 0 :(得分:0)
根据this错误npm
缓存或错误的react-redux
版本导致您遇到的错误。因此,更新react-redux
的版本可以解决问题。如果没有,请考虑清除npm
缓存并尝试重新运行您的应用。