hxelectron icon indicating copy to clipboard operation
hxelectron copied to clipboard

Cannot require "screen" module before app is ready

Open tong opened this issue 7 years ago • 3 comments

Using electron.Screen throws following error at runtime: Error: Cannot require "screen" module before app is ready

But how can we prevent loading the screen module before the App.ready event ?

tong avatar Apr 10 '17 20:04 tong

I guess we have to break the pattern and add some __init__ magic?

fponticelli avatar Apr 10 '17 20:04 fponticelli

See: electron/electron#5897

tong avatar Nov 23 '17 13:11 tong

Patched by adding @:native("require(\"electron\").screen") but still here

tong avatar Jul 20 '18 12:07 tong