metro: Could not list contents of .... Couldn't follow symbolic link.
Getting this error in android with doing release build.
cd android && ./gradlew assembleDevRelease
FAILURE: Build failed with an exception.
* What went wrong:
Could not list contents of '/.../node_modules/metro/node_modules/.bin/babylon'. Couldn't follow symbolic link.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 8
- Comments: 23
If
rm -rf node_modules && npm installdoes not do the trick, run the following in your project dir:find . -type l -exec test ! -e {} \; -deleterm -rf node_modules && npm installrm -rf node_modules && npm install
worked!
@jdnichollsc You just need to delete the file present inside .bin folder. just go to the respective path where the error file located and delete that.
and also make sure after deleting the file you have already deleted all the images from drawable folder , RN0.59 not support that and android automatically build the images for device in signed apk.
Thanks!
find . -type lfind all files of type link-execexecute the following command:test ! -e {}test if file found does not exist\;termination symbol for -exec-deletedelete the broken link1.We just need to delete the particular files(which is mentioned in the error) present inside “.bin” folder(nodemodule/node-pre-gyp/nodemodule/.bin/) 2. Clean and rebuild the app 3. Generate Signed apk
if we have run the bundle command before,then we will get the error of image duplicity- for that
we need to remove all the photos from android drawable folders
Clean and rebuild the app
Generate Signed apk