Hello,
I have upgraded recently to SDK 42 from 41. Some packages that I use are not supported in SDK 42. When running eas build for android, I get the following error message and the build fails:
Error loading assets JSON from Metro. Ensure you have followed all expo-updates installation steps correctly. Unable to resolve module unimodules-permissions-interface from /build/workingdir/build/node_modules/expo-image-picker-multiple/node_modules/expo-media-library/build/MediaLibrary.js: unimodules-permissions-interface could not be found within the project.
If you are sure the module exists, try these steps:
1. Clear watchman watches: watchman watch-del-all
2. Delete node_modules and run yarn install
3. Reset Metro's cache: yarn start --reset-cache
4. Remove the cache: rm -rf /tmp/metro-*
1 | import { EventEmitter, UnavailabilityError } from '@unimodules/core';
2 | import { Platform } from 'react-native';
3 | import { PermissionStatus, } from 'unimodules-permissions-interface';
4 | import MediaLibrary from './ExponentMediaLibrary';
5 | const eventEmitter = new EventEmitter(MediaLibrary);
6 | export { PermissionStatus };
The error is happing on line number 4.3 (it cannot find “unimodules-permissions-interface”).
However, I had the same error locally, but I was able to fix the issue by removing the dependencies from the package and change the package source code as well.
Locally everything works fine, but it seems that eas build is fetching the packages directly from github (in package-lock.json the url is resolving to github).
I tried to clear the cache during the build and it didn’t work. I can’t make the build locally because local builds are not supported in Windows.
The command that I am using for the build is:
eas build --clear-cache --platform android
Any idea how to force Metro server to take the package from my local machine?
Thanks in advance.