Closed BenV closed 7 years ago
This appears to be a bug in the electron-prebuilt-compile
module? I can reproduce the behavior by cloning electron-quick-start
and replacing electron
with electron-prebuilt-compile
in package.json
, then running npm install
and npm start
after adding the following to the bottom of main.js
:
console.log(app.getName())
console.log(app.getVersion())
CC: @paulcbetts
PR up in electron-prebuilt-compile
to fix this 👍
Please describe your issue:
*Console output when you run
electron-forge
with the environment variable `DEBUG=electron-forge:`. (Instructions on how to do so here). Please include the stack trace if one exists.**What command line arguments are you passing?
What does your
config.forge
data inpackage.json
look like?Please provide either a failing minimal testcase (with a link to the code) or detailed steps to reproduce your problem. Using
electron-forge init
is a good starting point, if that is not the source of your problem.When creating a new project with
electron-forge init
and then runningelectron-forge start
the methodsapp.getName()
andapp.getVersion()
return information about Electron itself instead of the values from package.json. They work fine when the application is packaged. This causes application data from all Electron Forge development apps to be put into the same directory, makes them all have the same user agent, etc. This does not happen in development mode with a minimalelectron-quick-start
application.If this is the expected behavior, is there any way to override this? My current workaround is to use
app.setAppName
etc, but that seems quite hacky. I apologize if this is documented somewhere, as it seems pretty basic. I tried searching around, but only found people using the same workaround: https://github.com/felixrieseberg/ember-electron/issues/199