slidev-vscode icon indicating copy to clipboard operation
slidev-vscode copied to clipboard

Slidev server not found on `http://localhost:3030/`

Open leo91000 opened this issue 3 years ago • 5 comments

I get the following message on VSCode : image

However my server is up and running on http://localhost:3030/ If I hit reload in the top right corner of the preview pannel, it does nothing. I am using VSCode 1.58.0 on windows on slidev-vscode 0.3.2

--- Edit : It seems that if I start my server, then I start VSCode it works. Maybe it is just a reload problem.

leo91000 avatar Jul 31 '21 10:07 leo91000

@leo91000 ,hi leo, I am totally new to this. Could I ask, how to start the slidev server after it's shut down. I tried to run"npm init slidev" but it will create a new project, which is not what I want.

SulfurZinc avatar Dec 27 '21 02:12 SulfurZinc

I second this, I can't make it work no matter when I start the server. Works fine in my browser.

hejfelix avatar Jul 01 '22 06:07 hejfelix

I'm also affected by this issue

Shinigami92 avatar Jul 04 '22 11:07 Shinigami92

same issue on archlinux

PeterWang-dev avatar Jul 25 '22 14:07 PeterWang-dev

Same issue in mac arm64 and windows10

Mickychen00 avatar Aug 14 '22 07:08 Mickychen00

Same issue

wakuflair avatar Nov 29 '22 01:11 wakuflair

Same issue

Delta-in-hub avatar Dec 01 '22 03:12 Delta-in-hub

Has anyone found a solution?

NonurSis avatar Jan 13 '23 02:01 NonurSis

workaround: add --remote option when starting slidev

AsakuraMizu avatar Jan 14 '23 08:01 AsakuraMizu

After some investigation, I figured out it's caused by the same problem as vitest-dev/vscode#55. Newer versions of node resolve localhost to ::1 while older ones (under 17) resolve localhost to 127.0.0.1. Unfortunately, VS Code uses node16.
As #issuecomment-1272985138 commented out, the issue could be solved by adding dns.setDefaultResultOrder("verbatim"), but it's not a good practice.

AsakuraMizu avatar Jan 14 '23 10:01 AsakuraMizu