Project no longer starts

A project of mine (Glitch :・゚✧) no longer starts; it just hangs at “Starting…”. I have downloaded the project and I know it works on my own system. There’s nothing obvious in the logs, and I didn’t change anything (that I know of) that would prevent it from starting.

The last thing in the logs is

  VITE v4.1.0  ready in 1094 ms

  ➜  Local:   http://localhost:5173/

  ➜  Network: use --host to expose
1 Like

vite’s trying to serve content on port 5173, but glitch only exposes port 3000 - you should change server.port to 3000 in your vite config.
Weird that it started happening out of the blue like that - did you update vite from something <3.0.0 to >=3.0.0? The default port changed in v3.
Happy glitching :slight_smile:

No, it started happening shortly following the outage last week though, so maybe something abouth that?

But this is from my vite.config.js:

server: {
    host:"0.0.0.0",
    port:3000,
    strictPort: true,
    hmr: {
      clientPort: 443 // Run the websocket server on the SSL port
    },
    headers: {
      "Cross-Origin-Embedder-Policy": "require-corp",
  		"Cross-Origin-Opener-Policy": "same-origin",
  		"Cross-Origin-Resource-Policy": "cross-origin"
		}
  }

So it seems it is set to 3000, yet is still serving it at 5173?

I think I see what happened, by comparing to the base project I started with. The vite configuration file got moved to public/ somehow, instead of the project root; probably a slip of the finger while I was copying other things.

I’ve moved it to the root and indeed the port is now 3000.

2 Likes

For anyone encountering this problem, it is caused by a bug in the file drag-and-drop interface; see report here: Bug in drag and drop to file system.

1 Like