React Native init specific version

IosReact Native

Ios Problem Overview


I upgraded my latest project to React Native 0.19 and instantly the video no longer works. How can I create a new project with a specific version? I want to init a new project at version 0.18.1. I did some google searches but couldn't find anything about this.

$ react-native init newproject --verbose

I'm guessing I need to add the word @18.1 in there somewhere but can't get that to work.

Ios Solutions


Solution 1 - Ios

This should do the trick:

$ react-native init newproject --version X.XX.X

Solution 2 - Ios

$ react-native init projectname --version 0.56.0 

please check this guide https://reactnative.dev/docs/environment-setup enter image description here

Solution 3 - Ios

Version and Template

Currently, I'm having problems with the 0.60.0 version so for doing this with version and typescript it goes like this:

react-native init ProjectName --version="0.59.9" --template="typescript"

This has 2 unwanted side effects:

  1. devDependencies will be the latest but the dependencies will be the chosen, this will work anyway after...
  2. You will get a react-native/libraries/NewAppScreen error, go to App.tsx and replace all of that for something simple like a <View style={{flex:1,backgroundColor:'orange'}}> so you can see it running

Solution 4 - Ios

You can do it like this:

react-native init YourProjectName --version X.XX.X

enter image description here

Solution 5 - Ios

This seems to work.

react-native init --version="0.36.0" MyNewApp

Check the comment on this link :).

Solution 6 - Ios

npx react-native init YOURPROJECTNAME --version X.XX.X

Solution 7 - Ios

react-native init Yout_Project_Name --version 0.63.3

Solution 8 - Ios

react-native init newApp --version 0.62.0

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionHasenView Question on Stackoverflow
Solution 1 - IosBataleonView Answer on Stackoverflow
Solution 2 - IosPolygonView Answer on Stackoverflow
Solution 3 - IoscutikoView Answer on Stackoverflow
Solution 4 - IosMustapha GHLISSIView Answer on Stackoverflow
Solution 5 - IosYeshan JayView Answer on Stackoverflow
Solution 6 - IosaybarsView Answer on Stackoverflow
Solution 7 - IosKeshav GeraView Answer on Stackoverflow
Solution 8 - Iossurya raghulView Answer on Stackoverflow