farm-fe / farm

Extremely fast Vite-compatible web build tool written in Rust
https://farmfe.org
MIT License
4.9k stars 161 forks source link

Electron + react template: Failed to construct 'WebSocket': The URL 'ws://localhost:9000__hmr' is invalid. [Bug Report]: #1522

Closed GustavoGomez092 closed 2 months ago

GustavoGomez092 commented 3 months ago

Steps to reproduce

npm create farm@latest my-react-app Then select electron and React template

Reproduce link

No response

What is actually happening?

HMR not working after clean npm install and npm run dev with error:

Uncaught DOMException: Failed to construct 'WebSocket': The URL 'ws://localhost:9000__hmr' is invalid.

image

System Info

System:
    OS: macOS 14.5
    CPU: (11) arm64 Apple M3 Pro
    Memory: 552.19 MB / 18.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.14.0 - /usr/local/bin/node
    npm: 10.7.0 - /usr/local/bin/npm
    pnpm: 9.4.0 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 126.0.6478.127
    Safari: 17.5
    Safari Technology Preview: 17.4
  npmPackages:
    @farmfe/core: ^1.2.4 => 1.2.6
ErKeLost commented 3 months ago

i'll try it