Closed davydany closed 7 years ago
Furthermore, I am starting the BrowserWindow with nodeIntegration
set to true, as such:
var mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true
},
});
And, I'm able to call require('electron')
without it throwing any errors, as such, in the Developer Tools console:
> require('electron')
>> Object {}
However, calling require('electron-compile/lib/initialize-renderer')
throws:
Uncaught Error: Cannot find module 'electron-compile/lib/initialize-renderer'
Figured it out. 😦
... I moved my project files around, and the index.html
I was referring to was from the old path, where node_modules
was empty.
When I load my BrowserWindow with my application, I see
getting injected right after the
<head>
tag. This, however, is throwing an error that says:The contents of
__magic__file__to__help__electron__compile.js
is:My
electron.js
(which Electron starts) has:I have
"electron-compile": "^6.4.1",
in mypackage.json
in mydependencies
object.I'm lost as to why
electron-compile
isn't getting setup properly.