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

Most upvoted comments

If rm -rf node_modules && npm install does not do the trick, run the following in your project dir: find . -type l -exec test ! -e {} \; -delete

rm -rf node_modules && npm install

rm -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 l find all files of type link -exec execute the following command: test ! -e {} test if file found does not exist \; termination symbol for -exec -delete delete the broken link

1.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

  1. we need to remove all the photos from android drawable folders

  2. Clean and rebuild the app

  3. Generate Signed apk