Skip to content

RE: VITE Port in use #52

@drrock77

Description

@drrock77

I had another program using port 5173. This caused VITE to launch on another port, but electron was only trying to load 5173. I made this local patch in src/main/index.ts to fix the issue:

  • console.log('VITE_DEV_SERVER_URL:', process.env.VITE_DEV_SERVER_URL);
  • console.log('ELECTRON_RENDERER_URL:', process.env.ELECTRON_RENDERER_URL);

  • console.log('VITE_DEV_SERVER_URL:', process.env.VITE_DEV_SERVER_URL);

    if (isDev) {

  • const devServerUrl =
  •  process.env.ELECTRON_RENDERER_URL ||
    
  •  process.env.VITE_DEV_SERVER_URL ||
    
  •  'http://localhost:5173';
    
    console.log('Loading from dev server:', devServerUrl);
    mainWindow.loadURL(devServerUrl).catch(err => {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions