I am trying to use Tensorflow for one of my project, and i have two .bin files that i want to load locally. I added them in assets folder, and now using code like:
const modelWeights1 = await require('../../assets/group1-shard1of2.bin');
Getting this error:
Android Bundling failed 10951ms node_modules/expo-router/entry.js (1247 modules)
Unable to resolve "../..assets/group1-shard1of2.bin" from "app/(tabs)/poseview.tsx"
I have searched alot, most of the solutions were to add metro.config.js
metro.config.js:
const { getDefaultConfig } = require('metro-config');
module.exports = (async () => {
const defaultConfig = await getDefaultConfig();
const { assetExts } = defaultConfig.resolver;
return {
resolver: {
// Add bin to assetExts
assetExts: [...assetExts, 'bin'],
}
};
})();
still its not working, I am getting the same issue. I am using Expo 52