facebook / metro

🚇 The JavaScript bundler for React Native
https://metrobundler.dev
MIT License
5.19k stars 619 forks source link

Could not list contents of .... Couldn't follow symbolic link. #288

Open Balasnest opened 6 years ago

Balasnest commented 6 years ago

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.
davekedar commented 5 years ago

Tried everything mentioned here but still getting this error

image

msand commented 5 years ago

Check https://github.com/facebook/react-native/issues/11212#issuecomment-363944142

msand commented 5 years ago

dupe https://github.com/facebook/react-native/issues/14417

crobinson42 commented 5 years ago

rm -rf node_modules && npm install

AnchalMulchandani commented 5 years ago

Any solution for this??. I have also the same problem.

davekedar commented 5 years ago

@AnchalMulchandani you can open project in android studio and update buildsdk and target sdk to solve this

AnchalMulchandani commented 5 years ago

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/)

  1. Clean and rebuild the app
  2. 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

jdnichollsc commented 5 years ago

Same issue here with RN 0.59.5:

> Task :app:bundleReleaseJsAndAssets FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Failed to capture fingerprint of input files for task ':app:bundleReleaseJsAndAssets' property '$1' during up-to-date check.
> Could not list contents of '/Users/jdnichollsc/builds/y9nRxChC/0/myapp/node_modules/.bin/needle'. Couldn't follow symbolic link.
AnchalMulchandani commented 5 years ago

@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!

reactdevrocks commented 5 years ago

@AnchalMulchandani did not work the above solution. Please give me some solution to build signed apk.

AnchalMulchandani commented 5 years ago

@AnchalMulchandani did not work the above solution. Please give me some solution to build signed apk.

what issue you are facing?

sagarv1997 commented 5 years ago

rm -rf node_modules && npm install

worked!

kumarutsav111 commented 5 years ago

Just run: rm -rf node_modules/metro/node_modules/.bin/babylon

for any other similar issues remove that file only eg: rm-rf /Users/kumarutsav111/Documents/OrtholiveProviderAppVijay/node_modules/.bin/uuid

celodauane commented 5 years ago

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

NirmalsinhRathod commented 4 years ago

@dvuvne Buddy, you make my day. Thanks :)

eisenheim94 commented 4 years ago

@dvuvne I've run it just in /node_modules/ folder and it is helped 👍

zoe1026 commented 4 years ago

@dvuvne work for me, Thanks

pavan168 commented 4 years ago

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

@dvuvne This worked. Thank you.

Samiksha19 commented 4 years ago

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

It worked for me.. thanks.. can you please tell me what exactly this command does? @dvuvne

e3bmo3ty commented 4 years ago

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

thanks so much....worked for me.... but what is this command any way ? 🤒

WALReactNative commented 4 years ago

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

This worked for me. Thank you so much!

JamesXNelson commented 4 years ago

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

wutiange commented 4 years ago

You can try to get through android studio first