Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode-site 0.2.5 doesn't work with Vite 5.0 #39

Open
5 tasks done
sun128764 opened this issue Nov 20, 2023 · 4 comments
Open
5 tasks done

vscode-site 0.2.5 doesn't work with Vite 5.0 #39

sun128764 opened this issue Nov 20, 2023 · 4 comments

Comments

@sun128764
Copy link

Describe the bug

When use Vite 5.0 vue-ts template and vscode-site 0.2.5, it will try to close(Ctrl+C) after a while.

image

Reproduction

https://stackblitz.com/edit/vitejs-vite-stmbrn?file=index.html&terminal=dev

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 Intel(R) Core(TM) i5-10500 CPU @ 3.10GHz
    Memory: 5.34 GB / 15.75 GB
  Binaries:
    Node: 18.4.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.6.7 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (119.0.2151.72)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@sun128764
Copy link
Author

This problem occurs at https://github.com/antfu/vscode-vite/blob/main/src/utils.ts#L41C5-L41C5
Somehow, the 'http.request' can't access http://localhost:4000 and throw an "ECONNREFUSED:127.0.0.1 refused to connect" error

@sun128764 sun128764 mentioned this issue Nov 25, 2023
5 tasks
@k0r37k1
Copy link

k0r37k1 commented Dec 5, 2023

there was no updates since 2021. maybe antony will fix it in the future or never?

@CrazyCatZhang
Copy link

I encountered the same issue.

@samuelsuarezsanchez
Copy link

I solved this issue by setting the Dev Command to start vite with a specific host:

npm run dev -- --host=127.0.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants