skip to Main Content

My android build fails with the following error
`MT

[stderr]

TypeError: (0 , sourceMapString_1.default) is not a function
Thu, 08 Aug 2024 20:17:02 GMT

[stderr]
at /home/expo/workingdir/build/node_modules/@expo/metro-config/build/serializer/withExpoSerializers.js:98:55`

upgrading and downgrading expo , metro-config as well as android min sdk versions, babel version. nothing works.
a previous branch with the same package json/build config was working but now also fails. so i am lost.

{ "name": "tagged-fe", "version": "1.0.0", "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo run:android", "ios": "expo run:ios", "web": "expo start --web", "preview-android": "eas build -p android --profile preview" }, "dependencies": { "@expo-google-fonts/inter": "^0.2.3", "@expo/config-plugins": "^7.8.0", "@expo/metro-runtime": "~3.1.3", "@expo/prebuild-config": "^6.7.0", "@expo/webpack-config": "^19.0.0", "@react-native-async-storage/async-storage": "^1.21.0", "@react-navigation/material-top-tabs": "^6.6.6", "@react-navigation/native": "^6.1.7", "@react-navigation/native-stack": "^6.9.13", "@shopify/flash-list": "1.6.3", "axios": "^1.5.1", "babel-plugin-module-resolver": "^5.0.2", "expo": "~50.0.19", "expo-av": "~13.10.6", "expo-constants": "~15.4.6", "expo-contacts": "~12.8.2", "expo-dev-client": "~3.3.12", "expo-device": "~5.9.4", "expo-font": "~11.10.3", "expo-haptics": "~12.8.1", "expo-image": "~1.10.6", "expo-linking": "~6.2.2", "expo-notifications": "~0.27.8", "expo-sharing": "~11.10.0", "expo-splash-screen": "~0.26.5", "expo-status-bar": "~1.11.1", "link-preview-js": "^3.0.5", "lottie-react-native": "6.5.1", "metro-config": "^0.80.10", "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.73.6", "react-native-link-preview": "^1.4.2", "react-native-paper": "^5.10.4", "react-native-reanimated": "^3.14.0", "react-native-safe-area-context": "4.8.2", "react-native-screens": "~3.29.0", "react-native-tab-view": "^3.5.2", "react-native-toast-message": "^2.1.7", "react-native-web": "~0.19.6", "react-native-webview": "13.6.4", "recoil": "^0.7.7" }, "devDependencies": { "@babel/core": "^7.25.2", "@types/react": "~18.2.14", "prettier": "^3.0.3", "typescript": "^5.1.3" }, "private": true }

2

Answers


  1. I had the same issue, upgrading to expo 51.0.26 did the trick. Hope it helps !

    Login or Signup to reply.
  2. Had the same issue starting from today on our monorepo. I had to bump the react-native to 0.74.5 and the @expo/metro-config to 0.18.11. These upgrades also require other expo-dependent packages to be upgraded to compatible versions, which can be done using npx expo install --fix command.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search