安装redux的时候,报错如下:
原因:我的package.json文件中的name属性写的是redux,这是关键字,有影响。所以,解决办法如下:
将redux改成了reduxTest之后,可以解决了:
{
"name": "reduxTest",
"version": "1.0.0",
"description": "Demos about redux.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Rui",
"license": "ISC",
"dependencies": {
"redux": "^3.7.2"
}
}