Error with electron 28.0.0. When using the initialize function in the main process I get the following error:
johannesjo opened this issue · 4 comments
johannesjo commented
I get an error with electron 28.0.0, when using the initialize function in the main process:
Cannot read properties of undefined (reading 'initializeFn')
at initialize (/home/johannes/www/super-productivity/node_modules/electron-log/src/core/Logger.js:120:10)
Originally posted by @johannesjo in #369 (comment)
megahertz commented
I think you import this lib as 'electron-log' instead of 'electron-log/main'
johannesjo commented
I think you import this lib as 'electron-log' instead of 'electron-log/main'
Just tried using
import { initialize } from 'electron-log/main';
and import { initialize } from 'electron-log';
There is no difference in the outcome unfortunately. I am using the latest version (5.0.1
) of electron log.
megahertz commented
Named import isn't supported since initialize
is an instance method.
johannesjo commented
Thank you for the explanation! That solved the problem!