when I run react-native start , it's error:
child_process.js:506
throw err;
^
Error: spawnSync /home/zing/AwesomeProject/node_modules/react-native/local-cli/setup_env.sh EACCES
at exports._errnoException (util.js:1036:11)
at spawnSync (child_process.js:461:20)
at Object.execFileSync (child_process.js:498:13)
at Object.run (/home/zing/AwesomeProject/node_modules/react-native/local-cli/cliEntry.js:163:16)
at Object.
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
[FILL THIS OUT]
[FILL THIS OUT]
This looks like a permission issue. If you look at the file node_modules/react-native/local-cli/setup_env.sh, it tries to set the ulimit to 2048, which it probably is not allowed to do on your system.
related #5668
I am having the same problem i am trying to run
react-native run-android
through linux system in a phone
I am getting same error, I am trying to run this command inside Docker
figured it out .... I was creating the project in my hard drive which was another media device for my linux system thus it did'nt run the command when i run it in the home directory it works
@nsisodiya running inside docker you might be facing the same issue I had, this was the fix that worked for me https://github.com/facebook/react-native/pull/12173
Simply had to go to my base project directory and run chmod -R 777 node_modules,from here http://stackoverflow.com/questions/41345894/react-native-start-eaccess-error-for-setup-env-sh
This issue has been inactive for a while. It's possible that the bug has been fixed since this issue was originally submitted, or perhaps it is not affecting a great amount of people, or a workaround has been provided. Either way, we're going to close this in order to allow the community to focus on more pressing issues.
If you strongly believe this issue should remain open, please provide a justification below.
@hramos It seems that you are rather rash about closing issues that have not been resolved by any stretch of the imagination. Forgive me for thinking that Facebook should pay more credence to bugs released to the public for production. If not, please explain to developers why we should have any faith in using Facebook's tooling for any development if there is no troubleshooting support provided by Facebook at all.
It's still happening for me:
PS C:\Dev\Todo> react-native run-android
child_process.js:614
throw err;
^
Error: spawnSync C:\Dev\Todonode_modules\react-native\local-clisetup_env.bat EPERM
at _errnoException (util.js:1041:11)
at spawnSync (child_process.js:569:20)
at Object.execFileSync (child_process.js:606:13)
at Object.run (C:/Dev/Todo/node_modules/react-native/local-cli/cliEntry.js:136:16)
at Object.
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
Why is that for every project we create newly, we end up getting this issue in IOS(Currently I am getting this issue for IOS)
I have the same problem, with the following setup:
All was working fine with npm 4.3.0, and broke when I upgraded it to 5.4.0.
The fix of running chmod -R 777 on the whole node_packages directory seems like a very dirty hack and potentially dangerous. Permissions exist for a reason, and somehow updating npm broke something.
Either npm is now more accurately sensitive to file permissions, in which case the permissions of said file should be updated to be executable, or npm is going crazy and we should report the bug to them.
Link relative issues: #15677, npm/npm#18324
More focused hack to fix this: find node_modules/react-native -name '*.sh' | xargs chmod a+x
If you wanna get back to coding without hacking around this silly node defect, just roll back your Node version with NVM https://github.com/creationix/nvm
People tell me NVM doesn't work for NPM, but rolling back Node seems to roll back NPM as well
I went back to using Yarn in the end, which works well.
I was just curious about npm 5.x, and while @vovkasm's fix works and is acceptable for the moment, it's annoying to have to run it every time the packages are rebuilt (fresh install, cleanup, CI...).
Back to coding now :)
Most helpful comment
Simply had to go to my base project directory and run chmod -R 777 node_modules,from here http://stackoverflow.com/questions/41345894/react-native-start-eaccess-error-for-setup-env-sh