Inorder to comply with react native environment recommendations on https://reactnative.dev/docs/getting-started.html I installed watchman using brew. After trying to run the application on android emulator, the applications fails to start and gives the following error:
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: spawnSync ./gradlew EACCES
at Object.spawnSync (internal/child_process.js:1041:20)
at spawnSync (child_process.js:616:24)
at execFileSync (child_process.js:643:15)
at runOnAllDevices (/Users/shehab/myapp/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:39)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Command.handleAction (/Users/shehab/myapp/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:182:9)
and meanwhile on metro bundler tab:
Loading dependency graph...2020-03-12T17:45:30,693: [0x7fff9aad5380] while computing sockname: failed to create /usr/local/var/run/watchman/shehab-state: No such file or directory
Watchman: watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= 2020-03-12T17:45:30,693: [0x7fff9aad5380] while computing sockname: failed to create /usr/local/var/run/watchman/shehab-state: No such file or directory
Thank you for reading. If you have encountered this error before and you have solved it please share. If you think this error is particular and you can solve it please do.