DEV Community

Discussion on: Vite + Vue 3 + electron + TypeScript

Collapse
 
jimhucksly profile image
Dmitriy Nevezhin • Edited

don't work!

(node:4232) electron: Failed to load URL: localhost:3000/ with error: ERR_CONNECTION_REFUSED
(Use electron --trace-warnings ... to show where the warning was created)

vite is not running after 'npm run electron'

Collapse
 
mujtabalab profile image
mujtaba-lab • Edited

I got stuck on this one too, here is how I got through:

Or use two separate terminal and run pnpm vite and pnpm dev:electron

"from the article"

Collapse
 
jenueldev profile image
Jenuel Oras Ganawed

I redid what I wrote above, but still works... try re reading the instruction above,, specially the script in package.json

Collapse
 
frandev profile image
Franco

This problem might be because vite port does not listen in port 3000 of local host. For fix it, see which port is vite running, and then, put it in the main.ts file

Image description

Image description