Build to blank screen on osx
See original GitHub issueEvery time I build my electron application it is successful but when I run the application Im presented with a blank screen. Im positive that it is finding my main.js and using it as modifications here result in changes in the built application. Any help with this would me much appreciated it.
Here is my build command
$ sudo electron-packager . foo --platform=all --arch=x64 --version=0.31.2 --overwrite
Here is my main.js
var app = require('app'); // Module to control application life.
var BrowserWindow = require('browser-window'); // Module to create native browser window.
// Report crashes to our server.
require('crash-reporter').start();
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
var mainWindow = null;
// 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
app.quit();
});
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
app.on('ready', function() {
// Create the browser window.
mainWindow = new BrowserWindow({width: 1400, height: 700});
// and load the index.html of the app.
mainWindow.loadUrl('file://' + __dirname + '/templates/index.html');
// Open the DevTools.
// mainWindow.openDevTools();
// Emitted when the window is closed.
mainWindow.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.
mainWindow = null;
});
});
Issue Analytics
- State:
- Created 8 years ago
- Comments:26 (13 by maintainers)
Top Results From Across the Web
If your Mac starts up to a blank screen - Apple Support
Press and hold the power button for about 10 seconds, until you see the startup options window, which includes a gear icon labeled...
Read more >Fix Mac Blank Black Screen Apple Silicon & Intel Macs
This video will Fix Apple Silicon & Intel Macs that won't start or are showing a blank, black or grey screen. Helpful if...
Read more >Fixed: MacBook Pro Booting Black screen - SoftwareKeep
A blank screen (black, blue, or gray) should appear once or more during startup. If you see your MacBook Pro booting black screen,...
Read more >Mac Screen Goes Black? Here's your troubleshooting guide!
Force restart your Mac · Hold down the power button for 6-10 seconds · When your Mac powers down, wait ten seconds ·...
Read more >How to Fix MacBook Pro Screen Goes Black in 12 Ways?
1. Change the Brightness of Mac Screen · 2. Check the Power of Your Mac · 3. Restart the MacBook Pro · 4....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have the exact same problem as gillyb running electron-packager 5.2.1 and using this command: electron-packager . myapp --ignore=“node_modules/(electron-packager|electron-prebuilt)” --platform=win32 --arch=ia32 --version=0.36.3 --overwrite --asar=false
Not sure if this is related to your problem, but please check Console it shows some errors log if any strange things occur. Mine is because of Uncaught Error https://github.com/onmyway133/blog/issues/145