Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react-native init specify react version and react-native version

I basically want to init a react-native project with [email protected] and [email protected] because dependency problems. However react-native command only allows me to specify react-native version:

react-native init sample --version [email protected]

This command not works:

react-native init diskful --version [email protected] --version [email protected]

This, too:

react-native init diskful --version [email protected] [email protected]

And this, too:

react-native init diskful --version [email protected] [email protected]

Install globally [email protected] or [email protected] does not affect. Please, someone help me!

like image 872
Chien Tran Avatar asked Jul 07 '17 09:07

Chien Tran


People also ask

How install specific version React Native?

You can install a particular version of the library by running npm install <library-name>@<version-number> , for example: npm install @react-native-community/netinfo@^2.0.

How do I update a react to a specific version?

To update your React version, install the latest versions of the react and react-dom packages by running npm install react@latest react-dom@latest . If you use create-react-app , also update the version of react-scripts . Copied! The command will update the versions of the react-related packages.


1 Answers

Create a project :

react-native init MyNewApp --version 0.45.0

If you want do change version then try with this:

npm install --save [email protected]
npm install --save [email protected]
like image 118
Balasubramanian Avatar answered Sep 28 '22 08:09

Balasubramanian