react-native: 'Couldn't follow symbolic link' when testing release build for Android
Description
When following the tutorials for generating the release APK for Android, I get the error described in Reproduction and cannot progress with build.
I don’t recall modifying the node_modules
folder manually, so not sure what happened to the symbolic link.
I’ve seen the same issue here, but just wanted to point this out since my version (0.34.1
) was released in September and its unclear in the old issue as to why its safe to remove these symbolic links.
Following the steps in the issue addressed above allowed me to build, but /.bin/repeating
was also missing.
Reproduction
- Follow steps described in the documentation above up until creating the release build.
- Run
cd android && ./gradlew assembleRelease
in project root folder.
FAILURE: Build failed with an exception.
* What went wrong:
Could not list contents of '~/myapp/node_modules/.bin/detect-indent'. Couldn't follow symbolic link.
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Additional Information
- React Native version: v0.34.1
- Platform: Android
- Operating System: MacOS
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 27
- Comments: 17 (1 by maintainers)
Removing
.bin
did not work, butrm -rf node_modules && npm install
did the trickThis worked for me: to delete the broken test-driver-link as follows
unlink node_modules/react-native/third-party/glog-0.3.4/test-driver
no need in removing the whole
node_modules
folder, for me was enough to remove onlynode_modules/.bin/
folderClosing this as removing
node_modules/.bin/
, in addition to a few other package directories solved the issue.Did you try removing your
node_modules
folder and installing dependencies again? What is the content of your package.json?Issue still exists on RN v0.42.0. Fixed by removing
node_modules/.bin/
Removing node_modules/.bin/ worked for me too.
unlinking packages maybe not the solution for everyone , but
is the way around.
removing node_modules/.bin/ worked for me to
I don’t why but for some reason
yarn install
worked!@lappalj4 this make my day ❤️
Removing
node_modules/.bin/
workedhave tried delete
node_modules
and thennpm install
. This worked for me.