反应原生 init 特定版本

我升级我的最新项目,以反应原生0.19和立即视频不再工作。如何创建具有特定版本的新项目?我想在0.18.1版本中初始化一个新项目。我在谷歌上搜索了一下,但是找不到任何关于这个的信息。

$ react-native init newproject --verbose

我猜我需要在这里加上@18.1这个单词,但不能让它起作用。

100063 次浏览

This should do the trick:

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

This seems to work.

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

Check the comment on this link :).

$ react-native init projectname --version 0.56.0

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

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

You can do it like this:

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

enter image description here

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

react-native init newApp --version 0.62.0

react-native init Yout_Project_Name --version 0.63.3

react-native init appname --version="0.63.4"