I face with a problem when try to use npm install
to install redux
to my react-native
project. Any time I do run npm install redux --save
the react-native
directory inside node_modules
will be cleared.
Then I use rm -rf node_modules && npm install
the all react-native
package does not install inside node_modules
so I must re-create project.
I also try to copy & past react-redux
and redux
in node_modules
from another project to my current react-native
project. But it can't success, the error lead me to the issue on github. I followed this help and it also fail.
Some other information:
? npm: 5.0.3
? react-native-cli: 2.0.1
? react-native: 0.45.0
? package.json
{
"name": "MyProjectNAME",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.0.0-alpha.12",
"react-native": "0.45.0",
"react-redux": "^5.0.5",
"redux": "^3.6.0"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-jest": "20.0.3",
"babel-preset-es2015": "^6.24.1",
"babel-preset-es2017": "^6.24.1",
"babel-preset-react-native": "1.9.2",
"jest": "20.0.4",
"react-test-renderer": "16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
}
}
Any suggest is appreciated. Thank you
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…