slidevjs/slidev-vscode

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

leo91000 opened this issue · 10 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 ,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.

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

I'm also affected by this issue

same issue on archlinux

Same issue in mac arm64 and windows10

Same issue

Same issue

Has anyone found a solution?

workaround: add --remote option when starting slidev

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.