Home > Software design >  native Could not find image './expo-asset/assets/${your_img_path}' not found in React Nati
native Could not find image './expo-asset/assets/${your_img_path}' not found in React Nati

Time:12-01

As my project is expo ejected react native project and I'm getting the error [native] Could not find image on path

'file:///var/mobile/Containers/Data/Application/..../Library/Application Support/.expo-internal/assets/...'

"react": "17.0.1", "react-native": "0.64.0", "expo": "~41.0.1", "expo-error-recovery": "^2.1.0", "expo-font": "~9.1.0", "expo-modules-core": "^0.2.0", "expo-splash-screen": "^0.10.3", "expo-status-bar": "~1.0.4", "expo-updates": "^0.5.5",

I have tried this solutions but not working any solution for my code

Firebase Cloud Messaging - Handling logout

Expo/React Native: Can't find image file after ejecting to bare workflow

CodePudding user response:

In my case after ejecting from expo I haven't changed this AppDelegate.m file enter image description here

enter image description here

please, make these changes in project/ios/your_project_name/AppDelegate.m make sure to change line number 52 to 58 according to image 1. make sure to change line number 92 to 98 according to image 2.

This works fine for me. Hope you will find this helpful.

CodePudding user response:

Check this

1) When ejecting, expo is supposed to generate a metro.config.js file that looks like that:

module.exports = {
  transformer: {
      assetPlugins: ['expo-asset/tools/hashAssetFiles']
  }
};

2) Your metro.config.js file should have .js extensions not .ts

  • Related