react-native-interactable: postinstall does not run as expected on ubuntu
The postinstall
script basically creates the symlinks:
android -> lib/android
ios -> lib/ios
This is the result of running it in OSX:

This is the result of running it in Ubuntu:

Trying to navigate in Ubuntu to ios
or android
library will not work.
It’s important to mention that running ln -sf lib/{ios,android} .
directly will work as expected:

About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 16
- Comments: 21 (3 by maintainers)
Commits related to this issue
- attempt to heal #146 Force postinstall to use `bash` to address #146 which created invalid symlinks on Linux. — committed to markhu/react-native-interactable by markhu 6 years ago
- don't assume bash-isms in default shell resolves #146 broken symlinks — committed to markhu/react-native-interactable by markhu 6 years ago
Manually doing the following after installing dependencies worked for me
cd $PROJECT_DIR/node_modules/react-native-interactable
rm -rf \{ios\,android\} && rm -rf android && rm -rf ios
ln -s lib/android . && ln -s lib/ios .
This might be a stupid question, but why don’t you simply split the commands in 2?
ln -s lib/android . && ln -s lib/ios .
It’s breaking my Bitrise automation too
@mkuczera Two months later now… any update? Setting up a Bitrise workflow (ubuntu) and found
react-native-interactable
was breaking the build.I can’t see a good reason for setting up a project like this, and along with all the people above, just need a simple solution to get my app(s) deployed.
@helloagain-dev my automated build is broken too, did you do a build in another way?
I would really appreciate if this gets fixed quickly, as this breaks our automated build.
We are currently working on maintenance work for the whole package. Please just be patient. We are fixing a bunch of issues right now and thinking about the following steps.
I had the same issue. The problem is that the postinstall script uses a specific bash feature called expansion, but by default npm uses dash and not bash (on Ubuntu): https://github.com/travis-ci/travis-ci/issues/3963
A temporary fix is to set npm script-shell using:
npm config set script-shell "/bin/bash"
or something similar (I’m using zshell so I rannpm config set script-shell "/usr/bin/zsh"
).