我刚刚通过"npx create react app";,然后当我这样做时;npm安装冗余";或";npm install—save dev redux";或";npm安装-保存redux"-它只是不修改包.json
我用";反应还原"react thunk";。。。但是。。。package.json保持不变。
我不知道怎么解决这个问题。请帮帮我。
"name": "basic_redux_setup",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.11.8",
"@testing-library/react": "^11.2.3",
"@testing-library/user-event": "^12.6.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
执行NPM脚本时,请确保您位于正确的目录,该目录必须与package.json
文件所在的目录相同。