New app "react-native start" return error without "sudo"
See original GitHub issueDescription
Later I can’t init project without sudo until I saw this issue and run sudo chmod 777 /home/xxxxx/.babel.json
, now I can init project without sudo (like react-native init AppName
) but when I create a simple project (just a project init) and try running this by react-native start
it’s return bellow message:
Loading dependency graph...(node:13642) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: EACCES: permission denied, open '/tmp/haste-map-react-native-packager-1-c06bcb90a866fe5fba0c98b29c4752c1'
When I use sudo react-native start
it’s working well. Why it’s need sudo
? How we can fix it?
Reproduction Steps
Create new project with:
react-native init TestApp
Change to this project directory:
cd TestApp
Try start app:
react-native start
Sample Code
Just simple hello world.
Solution
Run with sudo
Additional Information
- React Native version: 0.45.1
- Platform: both
- Development Operating System: Linux
- Build tools: React V. 16.0.0-alpha.12
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:10 (4 by maintainers)
Top Results From Across the Web
React-Native cannot run project if I am not Sudo - Stack Overflow
I found out from reading the post by Medium that u have to give permission to every folder explicitly when u encounter a...
Read more >Troubleshooting - React Native
These are some common issues you may run into while setting up React Native. If you encounter something that is not listed here, ......
Read more >Getting error while creating react native app - Ask Ubuntu
I solved this issue by changing the permission of my .npm directory. I went to the npm global directory for me it was...
Read more >How Run and Test React Native / Expo On Your Apple iOS ...
If you already have the latest version of Xcode installed, you may have to run the command `sudo xcode-select -s /Applications/Xcode.app`.ERROR
Read more >How to Install and Setup React Native on Ubuntu
Now, the creation of React Apps has become simple with the Create React App CLI tool that includes all JavaScript packages, code transpilers, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t understand so why it’s working well with
sudo
? 🤔@hramos No because docs said that it’s optional.