The situation here is that we have initiated a server in React Native using npm start, expo start or other methods and later killed the server using CTRL + C but when you run npm start again you see that the particular port is already being used and it asks if you want to use a different port
            Asked
            
        
        
            Active
            
        
            Viewed 345 times
        
    2
            
            
        
        AnatuGreen
        
- 579
 - 7
 - 14
 
- 
                    Please provide enough code so others can better understand or reproduce the problem. – Community Feb 04 '22 at 17:44
 
1 Answers
0
            
            
        i think this would help. Basically try to list the ports in use by :
$ lsof -i :3000 -t 12345
Then,kill the port, usually (pid) :
$ kill 12345
or, if it doesn't work,try this :
$ killall -9 node
Need further help? please do refer to this link: Node.js Port 3000 already in use but it actually isn't?
        Santiago Rao
        
- 11
 - 2