I am trying to create my first electron app.
I have a function in a JavaScript file (OtherFile.js):
function initializeOther() {
...
}
In my main JavaScript file I have
const { initializeOther} = require('./ioadapters/controllers/OtherFile');
function main() {
initializeOther();
app.on('ready', createWindow);
}
...
main();
I am trying to use the function from the other file. I only defined the function. I am not "exporting" it.
But I am getting following error:
App threw an error during load TypeError: initializeOther is not a function
What do I have to do to fix it?