Reputation: 823
I wanted to establish a live server , and quickly came across this extension.
After installing I clicked on the Go live button on right hand side corner.
A tabs automatically opens up in chrome browser , with this error message.
I have tried doing this , with no success.
Upvotes: 11
Views: 41066
Reputation: 823
This worked for me ,
I found this solution on a Github issue thread over here.
Just simply tick the checkbox stating Use Local Ip in the settings of vscode.
this will use your local IP address
if You want 127.0.0.1 then Follow these steps :
Either you can change PORT no as sometimes the default 5500 port is occupied by some other service
by just going to settings.json and add
"liveServer.settings.port": [PORT_NO] (as it is with quotes)
you can add any port number as you want
Example
"liveServer.settings.port": 5200
Upvotes: 43
Reputation: 21
It seems like another process is running on the same port as you're live-server extension is running.
Solution:
Settings > extensions > live server config > settings:port
option.edit in settings.json
option."liveServer.settings.port":<port_number>
to the port number of your choice which is not in use by any other process.Cause of the error:
telnet 127.0.0.0 5500
if there is no message or any other text is shown then it is used by another process. To check which process is using the port, use the following command:
netstat -anob
it will print informations of process using port numbers along with IP, check for 127.0.0.1 IP (i.e. localhost) and the 5500 port, you'll be able to find the process. Then check what process if couln't able to understand search for the same process in internet.
Upvotes: 0
Reputation: 91
yes, the above answer worked for me too. Steps to follow if You are a beginner like me:
Upvotes: 6