react-native start EACCESS error for setup_env.sh

in my case the error was with one particular file when i do react-native link:

Error: spawnSync ~/native-starter-kit/node_modules/react-native/local-cli/setup_env.sh EACCES

so i fixed it by running: chmod +x on that file.


This is a bug of npm. Before they fix the bug, you have 2 way to fix the problem:

  1. Downgrade the npm version to 5.3.0
  2. After npm i react-native, run chmod -R 775 node_modules

Simply had to go to my base project directory and run

chmod -R 777 node_modules