Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

173
Views
La aplicación My Electron después de que el paquete no se inicia

hola chicos, básicamente después de empaquetar mi aplicación con múltiples empaquetadores, todavía no quiere cargar la ventana cuando abro mi archivo .exe:/

 const PHPServer = require('php-server-manager'); const { app, Menu, shell, ipcMain } = require('electron'); const config = require('config') const path = require('path') const MainWindow = require('./MainWindow') let mainWindow; process.env.NODE_ENV = 'production' shell.showItemInFolder('fullPath') const isDev = process.env.NODE_ENV !== 'production' ? true : false const server = new PHPServer({ php: "foundation/php/php.exe", // <==== ADDED port: 8000, directory: path.resolve(__dirname)+'/source', stdio: 'inherit', directives: { display_errors: 1, expose_php: 1 }, config: `${__dirname}foundation/php/php.ini` }); function createWindow() { server.run(); mainWindow = new MainWindow('http://'+server.host+':'+server.port+'/', isDev) mainWindow.on('closed',function(){ mainWindow = null; }) } // Close App ipcMain.on('close-me', (evt, arg) => { app.quit() }) app.on('ready', createWindow) // Quit when all windows are closed. app.on('window-all-closed', function () { // On OS X it is common for applications and their menu bar // to stay active until the user quits explicitly with Cmd + Q if (process.platform !== 'darwin') { // PHP SERVER QUIT server.close(); app.quit(); } }) app.on('activate', function () { // On OS X it's common to re-create a window in the app when the // dock icon is clicked and there are no other windows open. if (mainWindow === null) { createWindow() } }) //app.disableHardwareAcceleration() app.commandLine.appendSwitch('force_high_performance_gpu') app.allowRendererProcessReuse = true

este es mi main.js y estoy usando PHP en este proyecto electrónico

también tenga en cuenta que uso la forja de electrones para el embalaje

cuando ejecuto npm start, la ventana aparece perfectamente, pero cada vez que empaqueto mi herramienta y luego trato de abrir el archivo exe, parece que no aparece nada, solo un pequeño ícono de la aplicación en la barra del explorador, bastante extraño ya que no hay error en mi código,

alguien tiene una respuesta?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!