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

Vite Dev Mode Cannot connect to the Vite Dev Server on http://localhost:5173 #937

Open
1 of 2 tasks
mundane799699 opened this issue Oct 25, 2024 · 5 comments
Open
1 of 2 tasks

Comments

@mundane799699
Copy link

Build tool

Vite

Where do you see the problem?

  • In the browser
  • In the terminal

Describe the bug

when I clicked the extension to open the page, it showed like below:
Vite Dev Mode
Cannot connect to the Vite Dev Server on http://localhost:5173
Double-check that Vite is working and reload the extension.
And it reloaded infinitely.
My project worked well yesterday, and I didn't change any code.Buyt today the issue occured.
image

Reproduction

https://github.com/mundane799699/crx-issue-reproduction

Logs

No response

System Info

windows11
chrome130.0.6723.70

Severity

annoyance

@yatami38
Copy link

yatami38 commented Oct 25, 2024

Please take a look at this issue; it might help you resolve the problem
696
860

@Tyru5
Copy link

Tyru5 commented Oct 25, 2024

I'm experiencing this issue as well 🤔

As @mundane799699 stated above, my project was working in the sense of successfully bootstrapping, and HMR was working; however, not today.

I reviewed the solutions you pasted above @yatami38, (thank you!); however, those didn't seem to resolve the issue for me :/

I know Chrome had an update to release version 130, but I am not sure if that could affect things in any way 🤷 I'm going to look into this today and provide any further details that can assist in resolving this issue.

@abdullah-tsx
Copy link

try this comment

@Toumash
Copy link

Toumash commented Oct 28, 2024

works just fine with newest vite and crx@beta, chrome 130.
Only issue #900

export default defineConfig(({ mode }) => {
  return {
    root: '.',
    build: {
      outDir: 'dist',
    },
    plugins: [
      crx({ manifest: createManifest() }),
      react(),
    ],
    server: {
      port: 5000,
    },
  };
});

@Tyru5
Copy link

Tyru5 commented Oct 28, 2024

try this comment

Awesome! This resolved the issue for me 💯

Thanks a bunch @abdullah-tsx 🎉

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

5 participants