question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New app "react-native start" return error without "sudo"

See original GitHub issue

Description

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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mnlboxcommented, Jun 22, 2017

I don’t understand so why it’s working well with sudo? 🤔

1reaction
mnlboxcommented, Jun 21, 2017

@hramos No because docs said that it’s optional.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found