New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot initialize "screen" module before app is ready #5897
Labels
Comments
This is an error of the documentation, you have to use the screen module like this: const electron = require('electron')
app.on('ready', () => {
const electronScreen = electron.screen
}) |
Is there a way to lift this requirement? I'm writing my electron apps using Kotlin, so I don't have influence on the require calls, they are just generated by the compiler like this: var app = $module$electron.app;
var screen = $module$electron.screen;
var last = Kotlin.kotlin.collections.last_2p1efm$;
var dropLast = Kotlin.kotlin.collections.dropLast_yzln2o$;
... |
Also just "requiring" something should definitely not have a sideeffect. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
screen
documentation starts withRunning this (even as the only line) in the main process throws an exception:
The text was updated successfully, but these errors were encountered: