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.

Unable to perform - 'react-native start'

See original GitHub issue

I am unable to start react-native server - β€˜react-native start’ It says there is already a process running. Is there a way to run the same on an alternate port?

There is this MACAFEE anti’virus’ running on my Mac. And in no way I am able to kill it(Even though I should not be killing it, I tried it, and looks like it never dies! Sudo has no power after all!)

Referred to #7308 and this stackoverflow

It didn’t help much.

Please suggest a way to run apps on a different port.

Logs

bozzmob:Twitter bozzmobusr$ sudo lsof -n -i4TCP:8081 | grep LISTEN
macmnsvc 87518  mfe   24u  IPv6 0x935b5ff42ebea7bf      0t0  TCP *:sunproxyadmin (LISTEN)
bozzmob:Twitter bozzmobusr$ react-native start
Scanning 595 folders for symlinks in /Users/bozzmobusr/collection/work/github/reactnative/Twitter/node_modules (5ms)
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” 
 β”‚  Running packager on port 8081.                                            β”‚ 
 β”‚                                                                            β”‚ 
 β”‚  Keep this packager running while developing on any JS projects. Feel      β”‚ 
 β”‚  free to close this tab and run your own packager instance if you          β”‚ 
 β”‚  prefer.                                                                   β”‚ 
 β”‚                                                                            β”‚ 
 β”‚  https://github.com/facebook/react-native                                  β”‚ 
 β”‚                                                                            β”‚ 
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ 
Looking for JS files in
   /Users/bozzmobusr/collection/work/github/reactnative/Twitter 

[4:33:12 PM] <START> Building Dependency Graph
[4:33:12 PM] <START> Crawling File System
 ERROR  Packager can't listen on port 8081
Most likely another process is already using this port
Run the following command to find out which process:

   lsof -n -i4TCP:8081 

You can either shut down the other process:

   kill -9 <PID> 

or run packager on different port.

See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
bozzmob:Twitter bozzmobusr$ sudo kill -9 87518
bozzmob:Twitter bozzmobusr$ sudo lsof -n -i4TCP:8081 | grep LISTEN
macmnsvc 88265  mfe   24u  IPv6 0x935b5ff457ed6d3f      0t0  TCP *:sunproxyadmin (LISTEN)
bozzmob:Twitter bozzmobusr$ 

Additional Information

  • React Native version: 0.32.1
  • Platform: both
  • Operating System: MACOS

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
juliantellezcommented, Sep 20, 2017

@bozzmob I just ran into the same problem, thanks McAfee πŸ‘Ž this is how I stopped the macmn process

sudo lsof -n -i4TCP:8081 # get the process' PID
sudo launchctl list | grep 5693 # find the launchd endpoint
sudo launchctl remove com.mcafee.agent.macmn 
1reaction
bozzmobcommented, Oct 29, 2016

But, I still see RED Screen of Death 😦 Need help.

What is happening - react-native start --port=8088 works fine. Haste Map and Dependency Graph is getting generated. App gets installed fine when I do react-native run-android. But, the red screen still shows up which says-

Could not connect to development server

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - React Native
Unable to start react-native package manager (on Linux)​​​ If you run into issue where executing npm run android on macOS throws the above...
Read more >
Unable to run React-Native - Stack Overflow
In this case, the error is telling you that you don't have the correct version of Java installed on your system. Gradle, which...
Read more >
Unable to run react-native app in Debug mode from Xcode
Now head to apps/mobile/ios/ and open Mobile.xcworkspace . Then in Xcode 'Edit Scheme' and make sure that the 'Build Configuration' is set to...
Read more >
Addressing common errors in React Native - LogRocket Blog
Another error that developers commonly encounter when attempting to run their React Native application is shown below: Unable to load script.
Read more >
React Native CLI full setup and error fix - YouTube
React Native CLI full setup and error fix: error Failed to install the app. Make sure have Android Β· Key moments. View all...
Read more >

github_iconTop Related Medium Post

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