Videos
Cannot GET /source/gfdfghdgh/A/1&2.html
This is the error I get because of the & symbol.
Make sure your file name has no special characters or symbols, because that might get interpreted differently by the browser.
This is a common server behaviour. The server tries to find a file or folder name page1 but doesn't find it. Nothing wrong with live server. I guess Netlify is the one doing extra magic.
However if you want to remove the .html in page1 you could create a folder name page1 and put inside a index.html with the content. This way the server will find the folder named page1 and return the index.html. This will also work with live server and any standard server.
This is how your folder structure could look like:

I had this problem and I solved it by changing the port number in the settings.json file to an opened one.
To get to the settings.json file you just click CTRL+SHIFT+P, then type "settings", click the "Preferences: Open Settings (JSON)", then paste this inside the { }:
"liveServer.settings.port": 0
This will randomly pick an opened port each time. This is how my JSON file looks like:
{
"liveServer.settings.port": 0
}
If there are multiple lines in the JSON file, make sure each line is separated by a comma(,), like this:
{
"liveServer.settings.CustomBrowser": "microsoft-edge",
"liveServer.settings.port": 0
}
Re-install the extension and restart your text editor to fix the issue.
Hello , am not sure this is the right place but when i open my htlm file with live server on google chrome , normal or Incognito mode its not working
this : https://cdn.discordapp.com/attachments/703709336370675913/1052567823165181963/image.png is what i am getting
I tried changing my browser , changed the live server version , changed the port nothing works .
I checke some google videos that told me to switch port , change folder name nothing works
Thanks in advance
edit: no its not .htlm was just a solution that did not work from youtube : https://cdn.discordapp.com/attachments/703709336370675913/1052588668289822730/image.png but no mater the file live server preview does not work for
edit2: ok i had to rename a few things it starting to work !
The problem was that live server was not updating changes so obviously it would not show any even if the other problems where solved,the solution was to change
• Open settings.
• Search for 'autosave'.
• Set it to 'afterDelay'.
It works fine ! thanks guys <3
» npm install live-server
I know this question already has been answered for long time ago.
Real answer are change the following:
"server": "cd public; live-server --port=1234 --entry-file=index.html"
to this
"server": "cd public & live-server --port=1234 --entry-file=index.html"
Just put &
Faced the same problem. Change the following:
"server": "cd public; live-server --port=1234 --entry-file=index.html"
to this:
"server": "live-server --port=1234 --open=public --entry-file=index.html"
For some reason, it is not processing cd public
More reference: https://www.npmjs.com/package/live-server
i cannot have two project folders with an html file running through the live server. Only one html file can be streamed at one time other wise when trying to stream the second, it will stream the first (Like the issue i was having)
I was having the same problem but later on I find out that, I renamed my project folder while my server was still loading the same project but with the previous folder name so I changed the link to my new folder folder name and it worked for me.
Now when I right-click on html.index file and choose "Open with live server" I get this error: Error: ENOTDIR: not a directory, stat '/Users/xxxxxxxxxxx/Desktop/HTML:CSS Templates/Newsgrid/index.html/'. It's happening with all projects.
Is this a known problem? Thanks
hello everyone , i've install live server in my vscode with ubuntu OS. suddenly its not working . i've tried reinstalling vs code still its not working . i paste this command "liveServer.settings.CustomBrowser": "chrome" in user.json setiings still it doesnt do anything .Not even getting the go live button in the status bar . Is there any solution to fix the problem .
Any help would be appreciated.