0
I want to use Electron with Node, but when importing this framework following the step by step of tutorial of the site, it always returns undefined
.
// Abaixo tanto o "app" quanto o "BrowserWindow" são undefined.
const { app, BrowserWindow } = require("electron");
I performed the installation of Electron using the command npm install electron
. I tried to import everything to know what was returning and what I received was the absolute path to an executable called electron.exe
.
// Retorna o seguinte path: "C:\\...\\MyFolder\\node_modules\\electron\\dist\\electron.exe"
const electron = require("electron");
What am I doing wrong? There was no error while installing the framework.
Are you executing the code via terminal (outside the IDE)? https://github.com/electron/electron/issues/8200#issuecomment-266923546
– Valdeir Psr
I am running the code via terminal. In the first example I ran through the
node main.js
and the second time I ran through the interactive mode of Node.– JeanExtreme002