react-nativeexpo

Expo stuck on: "Welcome to Expo" screen


So I've just installed Expo SDK51: "expo": "~51.0.8", and want to build something. But I have a weird error or bug that I only see the "Welcome to Expo" large text with a prompt to create a file in "app" dir. Although this should not occus since when I look up for the text it is nowhere in the files and the app dir already has the basic tab bar files with parallax. I have never seen this occur and I have no idea how to get out of this. Yes I have tried clean run, yes I've tried restarting and so on... this is just weird.


Solution

  • Did your project use react-native-dotenv or any other env Babel plugins? According to the Expo SDK 51 changelog:

    react-native-dotenv is not compatible with expo-router. If you are using the react-native-dotenv Babel plugin, it will overwrite expo-router configuration environment variables and you'll see the empty state "Welcome to Expo" screen. We are tracking the incomptibility in expo/expo#28933, but we recommend removing the library and Babel plugin, and instead using Expo CLI's built-in support for .env files (learn more).

    I had the problem when I upgraded my project from Expo SDK 49 to Expo SDK 51, so I erased module:react-native-dotenv from babel.config.js and removed the library, but it turned out I also had babel-plugin-transform-inline-environment-variables, so I had to remove that too. After refactoring to use Expo environment variables, my project worked fine.

    Hope this helps :)