title: React Native on Android: Cannot run program "node": error=2, No such file or directory
body: <p>EDIT: I am uncertain which steps I took to resolve this problem, and am no longer seeing this error message so I cannot test the solutions below. Please try them individually as different answers seem to be working for different people.</p>
  <p>The iOS version works fine, but running Android Studio on my Mac I get the following Gradle Build error (paraphrased):</p>
  <pre><code>:ReactNative:Running ‘[node, -e, console.log(require(‘react-native/cli’).bin);]’ command failed.
  
  - Where:
  Script ‘/Users/…/Desktop/…/node_modules/@react-native-community/cli-platform-android/native_modules.gradle’ line: 154
  
  - What went wrong:
  A problem occurred evaluating script.
  &gt; Cannot run program “node”: error=2, No such file or directory
  
  Caused by: java.io.IOException: Cannot run program “node”: error=2, No such file or directory
  </code></pre>
  <p>I've tried so many things:</p>
  <ul>
  <li>Following the React Native development set-up: <a href="https://reactnative.dev/docs/environment-setup" rel="noreferrer">https://reactnative.dev/docs/environment-setup</a></li>
  <li>Following this advice about [renaming?] the node path: <a href="https://stackoverflow.com/a/54007652">https://stackoverflow.com/a/54007652</a></li>
  <li>Following this advice about symlink: <a href="https://stackoverflow.com/a/52779097">https://stackoverflow.com/a/52779097</a></li>
  <li>Ran brew install node. Message: node 14.2.0 is already installed, it’s just not linked. Tried to run brew link --overwrite node, error /usr/local/share/doc/node is not writable.</li>
  <li>Tried to uninstall and reinstall all the package managers, node, yarn, whatever.</li>
  </ul>
  <p>I used to be able to still run yarn android in Terminal, but even that has stopped working.</p>