live-server
live-server copied to clipboard
http://0.0.0.0:8080 is already in use. Trying another port.
Before submitting an issue, please, see https://github.com/tapio/live-server#troubleshooting
Issue description
When starting the server, it complains that http://0.0.0.0:8080 is already in use. As far as I can tell, this isn't true.
If I change the host to 127.0.0.1, the server starts correctly.
Here's how I'm calling live-server.
import liveServer from 'live-server';
const params = {
port: 8080, // Set the server port. Defaults to 8080.
host: '0.0.0.0', // Set the address to bind to. Defaults to 0.0.0.0 or process.env.IP.
root: './fixtures/site', // Set root directory that's being served. Defaults to cwd.
open: false, // When false, it won't load your browser by default.
logLevel: 0, // 0 = errors only, 1 = some, 2 = lots
};
liveServer.start(params);
Software details
- Command line used for launching
live-server
: cmder (conemu) - OS: Windows 10 Enterprise
- Browser (if browser related): N/A
- Node.js version: v8.11.4
-
live-server
version: 1.2.1
Turns out there was a process using that port. I killed it and now it works fine.
First I used netstat to find the PID
netstat -ano | findstr :8080
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 14320
Then I killed that process
taskkill /f /im 14320
SUCCESS: The process with PID 14320 has been terminated.
I'm not sure if this issue would be present for any Windows user or I have something specific to my setup going on...
``