In my ~/github directory, run git clone [email protected]:expo/expo.git. This takes a while, as it has to download 3 GiB
Navigate to cd expo and run yarn, this might take a minute
Navigate to: cd apps/native-component-list folder
Run yarn start which should start the Metro server
- For web: run
yarn weband it will show in your browser in localhost:8081 - For Android:
- We cannot use Expo Go (maybe that is supposed to work, but gives an error), so we need to build the app locally first
- Update the versions of two dependencies in package.json that fix errors with React Native 0.77: "@shopify/flash-list": "1.7.3", "@shopify/react-native-skia": "1.11.3",
- Remove
expo-updatescompletely from package.json, it will give you an error related to kspVersion otherwise - Remove the
config.serializer.getPolyfillssection frommetro.config.js - run
yarnagain - run
yarn android, if you are using Java 17 you might get an error, go toandroid/gradle.propertiesand remove-XX:MaxPermSize=2048mfrom line 13 - Another error might be in
packages/expo-ui/android/build.gradle,packages/expo-maps/android/build.gradleandpackages/expo-modules-core/android/build.gradlewith the version of the Compose Gradle plugin. In buildscript add: ext { kotlinVersion = '2.0.21' } - Now the app will be bundled and started in your default Emulator
- Click on the 'Components' tab in the tab bar
- Click on the list item 'Expo UI'
- Note: if you want to run the app on your real device, connect it via USB and run
yarn android --device
- For iOS:
- From
expo/packages/expo-notifications/expo-module.config.jsremove the"appDelegateSubscribers": ["PushTokenAppDelegateSubscriber"]line, as it will cause a build error - Now run
yarn ios --deviceand select a device connected by USB cable (or justyarn iosand use a Simulator) - If you get an
Untrusted Developerpopup on your phone, go to Settings -> General -> VPN & Device Management -> Developer App and press the button to trust your app developer. Then re-run youryarn ioscommand. - Sometimes if you get weird build errors, it helps to open the project in Xcode (run
open ios/ExpoAPIs.xcworkspace) and build from there, then you can also select an App Developer or Team if it asks about that
- From
Actually, use the
bare-expoapp instead ofnative-component-list, it will compile runningyarn iosoryarn androidwithout errors.