Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

130
Visualizações
electron js does not start react js

i have a react app inside of my electron js i use electron-packager . for creating exe file of my project the exe file is generated success fully but the issue is that when i open the exe file only the electron app gets started since i dont do npm start my react app is not starting and the screen is white when the app start

in devlopement i can do npm start(to start react ) and then i can do npm run dev (to start electron) i am adding scripts that are in my pakage.json what changes must i do to fix this issue

    "start": "electron .",
    "build": "react-scripts build",
    "dev": "electron .",
    "test": "react-scripts test",
    "electron": "npm:start && electron .",
    "eject": "react-scripts eject"
  },

enter image description here

const { app, BrowserWindow } = require("electron");
const isDev = require("electron-is-dev");
let mainWindow;

app.on("ready", () => {
  mainWindow = new BrowserWindow({
    width: 1024,
    height: 680,
    webPreferences: {
      nodeIntegration: true,
    },
  });
  const urlLocation = isDev ? "http://localhost:3000" : "http://localhost:3000";
  mainWindow.loadURL(urlLocation);
  mainWindow.maximize();
});
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda