mrousavy/react-native-fast-tflite

Unable to resolve module ./LogBoxImages/close.png

musawarbilal786 opened this issue · 3 comments

In IOS when I use this package and run code I get this error

Error: Unable to resolve module ./LogBoxImages/close.png from /node_modules/react-native/Libraries/LogBox/UI/LogBoxNotification.js

  107 |         style={dismissStyles.press}>
  108 |         <Image
> 109 |           source={require('./LogBoxImages/close.png')}
      |                            ^
  110 |           style={dismissStyles.image}
  111 |         />
  112 |       </LogBoxButton>

React Native: v0.73.10
react-native-fast-tflite: 1.1.3

You also still need to have png and jpg in the metro config where tflite is.

You also still need to have png and jpg in the metro config where tflite is.

Thank you it was helpful, issue is resolved

For anyone interested, I did this to only append tflite to metro defaults.

// metro.config.js
const defaultAssetExts = require("metro-config/src/defaults/defaults").assetExts;
module.exports = {
  resolver: {
    assetExts: [...defaultAssetExts, 'tflite'],
  }
};