My Electron App does not run correctly. Built for Windows


#1

Hello, my name is Abel, I have finished my app in electron, so I build it in windows. All correctly, but when I start the app, it not run, not show. Nevertheless in the task manager I can see the process running. What I can do?. If i run the start command of my app, the app show.


#2

my main.js:

const electron = require('electron')
const {app, BrowserWindow} = require('electron');

const path = require('path')
const url = require('url')
let win

function createWindow(){
	const {width, height} = electron.screen.getPrimaryDisplay().workAreaSize

	win = new BrowserWindow ({width:500, height:500})	

	win.maximize()

	win.loadURL('file://' + __dirname + '/index.html');
	
	// Emitted when the window is closed.
	win.on('closed', function() {
	   // Dereference the window object, usually you would store windows
	   // in an array if your app supports multi windows, this is the time
	   // when you should delete the corresponding element.
	   win = null;
	 });

}

app.on('ready', createWindow);

// Quit when all windows are closed.
app.on('window-all-closed', function() {
  if (process.platform != 'darwin')
    app.quit();
});