Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create an expo project with a specific version

How do you specify the expo version when creating a project? Such as in React Native you can just add the version in the command like this react-native init projectName [email protected]

What about in expo init projectName ?

like image 932
Eaten Taik Avatar asked Dec 30 '22 22:12

Eaten Taik


1 Answers

There is no way to specify react native version in expo cli. But you can specify SDK version in expo cli. Each SDK corresponds to particular react native version you can find the react native version for the expo sdk here(https://github.com/expo/react-native/releases)

For example, if you want to work with react native 0.61.4, you can use expo sdk-37.0.1

expo init --template [email protected]

EDIT as of now, it depends on how you start your package manager.

npm create-expo-app [name] --template blank@45
yarn create-expo-app [name] --template blank@45
pnpm create-expo-app [name] --template blank@45
npx create-expo-app [name] --template blank@45

Unfortunately there's no nice way of doing an npm search but the pattern for the template is anything that starts with expo-template is a potential candidate. The author you'd be looking for is brentvayne from Expo team. Reference:

  1. https://github.com/expo/react-native/releases
  2. https://docs.expo.io/workflow/upgrading-expo-sdk-walkthrough/?redirected
  3. https://github.com/expo/expo-cli/issues/142
like image 200
Manikandan Avatar answered Jan 21 '23 13:01

Manikandan