asset not loading when i add "expo-updates"

am using expo": "^46.0.0", and i wanted to load my app in a certain scenario and i added "expo-updates": "~0.14.7", then my app stoped loading assets after build even i remove the implementation from my component and if the package is still in the package.json file it will still not load assets. my assets loader is inside root of the project not on src or other folder. iin the development it works fine but when i build it stops working
eas build -p ios this is how i build

changing my metro config fixed it

module.exports = (async () => {
  const {
    resolver: { sourceExts, assetExts },
  } = await getDefaultConfig(__dirname);
  return {
    transformer: {
      babelTransformerPath: require.resolve("react-native-svg-transformer"),
      assetPlugins: ["expo-asset/tools/hashAssetFiles"],
    },
    resolver: {
      assetExts: assetExts.filter((ext) => ext !== "svg"),
      sourceExts: [...sourceExts, "svg"],
      extraNodeModules: new Proxy(extraNodeModules, {
        get: (target, name) => {
          // redirects dependencies referenced from shared/ to local node_modules
          return name in target ? target[name] : path.join(process.cwd(), `node_modules/${name.toString()}`);
        },
      }),
    },
    watchFolders,
  };
})();
2 Likes