I have just migrated to a new workstation, and I’m having a hard time running my existing Expo projects, as well as creating brand new Expo projects using the expo-cli.
$ expo init testproject
...
$ cd testproject/
$ expo start
[18:40:45] Starting project at /mnt/storage/Projects/testproject
[18:40:45] Expo DevTools is running at http://localhost:19002
[18:40:45] Opening DevTools in the browser... (press shift-d to disable)
[18:40:48] Starting Metro Bundler on port 19001.
[18:40:48] Metro Bundler ready.
[18:40:48] Successfully ran `adb reverse`. Localhost URLs should work on the connected Android device.
[18:40:50] Trying to open the project on Android...
[18:40:50] Downloading latest version of Expo
[18:40:50] Installing Expo on device
[18:40:52] Opening on Android device
The Expo SDK requires Expo to run. It appears the native Expo modules are unavailable and this code is not running on Expo. Visit https://docs.expo.io to learn more about developing an Expo project.
<unknown>
validate.js:11:8
loadModuleImplementation
require.js:214:12
guardedLoadModule
require.js:148:36
_require
require.js:132:20
<unknown>
Expo.js:2
loadModuleImplementation
require.js:214:12
guardedLoadModule
require.js:148:36
_require
require.js:132:20
<unknown>
AppEntry.js:1
loadModuleImplementation
require.js:214:12
guardedLoadModule
require.js:141:45
_require
require.js:132:20
global code
Any ideas what might be wrong, and where to look for potential problems?
I got the exact same error this morning, after I updated expo-cli to 2.2.3 . But yesterday, the previous version didn’t give me any error.
So I tried rollbacking “expo-cli” to the previous version, but I continue to get the same error. I can’t explain it. I thought rollbacking would have solved the problem.
Thanks, this did the trick
I was initially struggling to get this right, we have to install globally expo-cli@2.2.4: npm install -g expo-cli I didn’t have to specify the version.
I just ran into this problem even though I didn’t had this before. I’m running expokit@1.7.1, expo-cli@2.2.4 and expo@30.0.0. This is a detached Android build
For now I have to work around to comment out the part:
if (!Constants || !Constants.expoVersion) {
// throw new Error(
// `The Expo SDK requires Expo to run. It appears the native Expo modules are unavailable and this code is not running on Expo. Visit https://docs.expo.io to learn more about developing an Expo project.`
// );
}
Hi @bankify_expo_admin - do you know what changed between when it was working and when it stopped working? Did you upgrade a library or your version of expo-cli?
Sorry for delayed response, I wasn’t changing any configuration and expo-cli, it was just showing the error out of nowhere, while the day before it didn’t
I had same error when I updated Expo client in play store. I fixed it by uninstalling Expo client and installing Expo client from the command line with ‘expo install:android’