react-native init specify react version and react-native version
I basically want to init a react-native project with react@15.6.0 and react-native@0.45.0 because dependency problems. However react-native command only allows me to specify react-native version:
react-native init sample --version react-native@0.45.0
This command not works:
react-native init diskful --version react-native@0.45.0 --version react@15.6.0
This, too:
react-native init diskful --version react-native@0.45.0 react@15.6.0
And this, too:
react-native init diskful --version react@15.6.0 react-native@0.45.0
Install globally react@15.6.0 or react-native@0.45.0 does not affect. Please, someone help me!
Create a project :
react-native init MyNewApp --version 0.45.0
If you want do change version then try with this:
npm install --save react-native@0.44.0
npm install --save react@16.0.0-alpha.6
- delete node_modules folder
Edit Package.json
"dependencies": { "react": "15.6.0", "react-native": "0.45.0", },
- run command 'npm install'
You could initiate the app using
react-native init --version="0.45.0" yourapp,
If further changes are needed, make changes in package.json
in react or react-native fields and simply do npm install
Comments
Post a Comment