vitejs / vite

Next generation frontend tooling. It's fast!
http://vite.dev
MIT License
69.01k stars 6.24k forks source link

First time use: I've installed react template and the page keeps reloading. #7848

Closed laurencefass closed 2 years ago

laurencefass commented 2 years ago

Describe the bug

First time use. Ive installed react template and the page keeps reloading.

Also seeing following console errors:

[vite] connecting...
​ Download the React DevTools for a better development experience: https://reactjs.org/link/react-devtools
​ WebSocket connection to 'wss://reactvite.syntapse.co.uk:3400/' failed: 
(anonymous) @ /@vite/client:188
​ [vite] server connection lost. polling for restart...
Navigated to https://reactvite.syntapse.co.uk/
client.ts:16 [vite] connecting...
react-dom_client.js?v=ca2558d6:sourcemap:20579 

live example here:

https://reactvite.syntapse.co.uk/

Reproduction

https://reactvite.syntapse.co.uk/

System Info

System:
    OS: Linux 4.19 Alpine Linux
    CPU: (1) x64 Intel Core Processor (Haswell, no TSX)
    Memory: 105.07 MB / 3.76 GB
    Container: Yes
    Shell: 1.33.1 - /bin/ash
  Binaries:
    Node: 16.13.1 - /usr/local/bin/node
    Yarn: 1.22.15 - /usr/local/bin/yarn
    npm: 8.1.2 - /usr/local/bin/npm
  npmPackages:
    @vitejs/plugin-react: ^1.3.0 => 1.3.1
    vite: ^2.9.5 => 2.9.5

Used Package Manager

npm

Logs

No response

Validations

bluwy commented 2 years ago

You can find similar discussion at https://github.com/vitejs/vite/issues/6089. It's usually some ports that aren't forwarded properly that causes the issue.