Coder Social home page Coder Social logo

electron / forge Goto Github PK

View Code? Open in Web Editor NEW
6.3K 6.3K 483.0 67.96 MB

:electron: A complete tool for building and publishing Electron applications

Home Page: https://electronforge.io

License: MIT License

JavaScript 5.36% HTML 0.31% Shell 0.07% TypeScript 94.20% CSS 0.03% Batchfile 0.03%
build electron hacktoberfest javascript linux macos package typescript webpack windows

forge's People

Contributors

anaisbetts avatar anulman avatar bendemboski avatar bengotow avatar caoxiemeihao avatar clavin avatar codebytere avatar daydayhappychao avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar dsanders11 avatar electron-roller[bot] avatar erickzhao avatar erikian avatar felixrieseberg avatar georgexu99 avatar jacobq avatar lukebatchelor avatar mahnunchik avatar malept avatar marshallofsound avatar mozgiii avatar r-nk avatar shimaore avatar timfish avatar vertedinde avatar vhashimotoo avatar vintprox avatar yangannyx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forge's Issues

Cannot import ES6 modules on windows

The same code was running on Windows and OSX.
But it randomly stopped working on Windows 10

error is:

import { app, BrowserWindow } from 'electron';
^^^ 
SyntaxError: Unexpected token import

screenshot of the error is:

electron-forge-cannot-import

I do not have a testcase as such. it randomly stopped working
but the sample app is at https://github.com/deepak/electron-webview-todo/

i am using Powershell ISC on Windows 10 for running npm start

Console output when you run electron-forge with the environment variable DEBUG=electron-forge:*.

PS C:\Users\Deepak\Documents\Visual Studio 2013\Projects\electron-webview-todo> npm start

> [email protected] start C:\Users\Deepak\Documents\Visual Studio 2013\Projects\electron-webview-todo
> cross-env DEBUG=electron-forge:* electron-forge start --enable-logging

npm : WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
At line:1 char:1
+ npm start
+ ~~~~~~~~~
    + CategoryInfo          : NotSpecified: (WARNING: DEBUG ...forge:lifecycle:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
Fri, 20 Jan 2017 10:39:29 GMT electron-forge:lifecycle Process Started: Checking your system
Fri, 20 Jan 2017 10:39:29 GMT electron-forge:lifecycle Process Succeeded: Checking your system
Fri, 20 Jan 2017 10:39:29 GMT electron-forge:runtime-config setting key: verbose to value: false
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
Fri, 20 Jan 2017 10:39:31 GMT electron-forge:lifecycle Process Started: Locating Application
Fri, 20 Jan 2017 10:39:31 GMT electron-forge:project-resolver searching for project in: 
C:\Users\Deepak\Documents\Visual Studio 2013\Projects\electron-webview-todo
Fri, 20 Jan 2017 10:39:31 GMT electron-forge:project-resolver electron-forge compatible package.json found in 
C:\Users\Deepak\Documents\Visual Studio 2013\Projects\electron-webview-todo\package.json
Fri, 20 Jan 2017 10:39:31 GMT electron-forge:lifecycle Process Succeeded: Locating Application
Fri, 20 Jan 2017 10:39:31 GMT electron-forge:lifecycle Process Started: Preparing native dependencies
Fri, 20 Jan 2017 10:39:31 GMT electron-forge:lifecycle Process Succeeded: Preparing native dependencies
Fri, 20 Jan 2017 10:39:31 GMT electron-forge:lifecycle Process Started: Launching Application
Fri, 20 Jan 2017 10:39:31 GMT electron-forge:lifecycle Process Succeeded: Launching Application

App threw an error during load
C:\Users\Deepak\Documents\Visual Studio 2013\Projects\electron-webview-todo\src\main-process\main.js:5
import { app, BrowserWindow } from 'electron';
^^^^^^
SyntaxError: Unexpected token import
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:528:28)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at loadApplicationPackage (C:\Users\Deepak\Documents\Visual Studio 2013\Projects\electron-webview-todo\node_module
s\electron\dist\resources\default_app.asar\main.js:280:12)
    at Object.<anonymous> (C:\Users\Deepak\Documents\Visual Studio 2013\Projects\electron-webview-todo\node_modules\el
ectron\dist\resources\default_app.asar\main.js:322:5)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)

What command line arguments are you passing?

command to start Elecron is:

cross-env DEBUG=* electron-forge start --enable-logging

What does your config.forge data in package.json look like?

{
    "forge": {
      "make_targets": {
        "win32": [
          "squirrel"
        ],
        "darwin": [
          "zip"
        ],
        "linux": [
          "deb",
          "rpm"
        ]
      },
      "electronPackagerConfig": {},
      "electronWinstallerConfig": {
        "name": "electron-webview-todo"
      },
      "electronInstallerDebian": {},
      "electronInstallerRedhat": {},
      "github_repository": {
        "owner": "",
        "name": ""
      }
    }
  }

init with a builtin custom template throws a require error

When using electron-forge to initialize a project on Windows with --template=react, electron-forge fails to recognize the template package isn't installed and bombs out. It's not clear if this is a docbug or softwarebug.

Workaround:
npm install -g electron-forge-template-react before executing electron-forge init

Shortened log (full log available):

  [...]
  electron-forge:runtime-config fetching key verbose +1ms
  electron-forge:runtime-config fetching key verbose +36ms
  electron-forge:init:npm not installing linting deps +39s
  electron-forge:lifecycle Process Succeeded: Installing NPM Dependencies +8ms
  electron-forge:lifecycle Process Started: Locating custom template: "react" +1ms
  electron-forge:init:custom using local template +4ms
  electron-forge:lifecycle Process Succeeded: Locating custom template: "react" +0ms

An unhandled rejection has occurred inside Forge:
path must be a string
AssertionError: path must be a string
    at Module.require (module.js:496:3)
    at require (internal/module.js:20:19)
    at _callee4$ (C:\Users\Rafael\AppData\Roaming\npm\node_modules\electron-forge\dist\init\init-custom.js:108:30)
    at tryCatch (C:\Users\Rafael\AppData\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:64:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\Rafael\AppData\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:355:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Users\Rafael\AppData\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:116:21)
    at GeneratorFunctionPrototype.tryCatcher (C:\Users\Rafael\AppData\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\util.js:16:23)
    at PromiseSpawn._promiseFulfilled (C:\Users\Rafael\AppData\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\generators.js:97:49)
    at Promise._settlePromise (C:\Users\Rafael\AppData\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:572:26)
    at Promise._settlePromise0 (C:\Users\Rafael\AppData\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:612:10)
    at Promise._settlePromises (C:\Users\Rafael\AppData\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:691:18)
    at Async._drainQueue (C:\Users\Rafael\AppData\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (C:\Users\Rafael\AppData\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues (C:\Users\Rafael\AppData\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:637:20)
    at tryOnImmediate (timers.js:610:5)

Support for custom template directories

There are a bunch of framework-specific Electron boilerplates, e.g., for React & Vue. Perhaps we should allow initializing using a custom template directory?

exe file not updated with given icon

Hi,

When building using electron-forge, the Windows application exe icon is not changed.

Command used to make: ./node_modules/.bin/electron-forge.cmd make

config.forge.electronPackagerConfig in package.json:

"electronPackagerConfig": {
    "icon": "./assets/img/icon.ico",
    "electronVersion": "1.4.4",
    "asar": true
},
"electronWinstallerConfig": {
    "name": "eapp",
    "setupExe": "eapp-0.0.2.exe",
    "description": "EApp Application",
    "loadingGif": "./assets/img/install-splash-anim.gif",
    "iconUrl": "http://manikanta.com/favicon.ico",
    "setupIcon": "./assets/img/icon.ico",
    "noMsi": true
}

Note: Setup exe is getting generated with correct icon, mentioned in config.forge.electronWinstallerConfig

But if I run the electron-packager manually, icon is changed:
.\node_modules\.bin\electron-packager ./ --asar=true --icon=./assets/img/icon.ico --electron-version=1.4.4

Even some other config params of electron-packager are not being picked up from package.json as described in electron-packager api. For example, even though I've specified author in package.json, I've to specify that in config.forge.electronPackagerConfig.win32metadata.

Stack: Windows 8.1 x64, electron-forge: 2.6.0, electron-prebuilt-compile: 1.4.4

Is this a bug with electron-forge? or, am I missing something? Thanks.

REMOTE.require() not working

Please describe your issue:
When I require some module from renderer process, it is working fine. But if I require and remote module (which is already loaded in main process) from renderer process, exception is seen.

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.

Command prompt output: Pasted in next comment to keep the actual issue statement tidy.

Browser window console logs:

c:\eapp\node_modules\electron-prebuilt-compile\node_mo…:217 Uncaught Error: Cannot find module './services/sqlite-dao'
Error: Cannot find module './services/sqlite-dao'
    at Module._resolveFilename (module.js:455:15)
    at Function.Module._resolveFilename (c:\eapp\node_modules\electron-prebuilt-compile\node_modules\electron\dist\resources\electron.asar\common\reset-search-paths.js:35:12)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at EventEmitter.<anonymous> (c:\eapp\node_modules\electron-prebuilt-compile\node_modules\electron\dist\resources\electron.asar\browser\rpc-server.js:241:70)
    at emitTwo (events.js:106:13)
    at EventEmitter.emit (events.js:191:7)
    at WebContents.<anonymous> (c:\eapp\node_modules\electron-prebuilt-compile\node_modules\electron\dist\resources\electron.asar\browser\api\web-contents.js:231:13)
    at emitTwo (events.js:106:13)
    at WebContents.emit (events.js:191:7)metaToValue @ c:\eapp\node_modules\electron-prebuilt-compile\node_mo…:217exports.require @ c:\eapp\node_modules\electron-prebuilt-compile\node_mo…:304(anonymous function) @ bo-login.js:4(anonymous function) @ bo-login.js:61

What command line arguments are you passing?

None specifically.

What does your config.forge data in package.json look like?

"forge": {
    "make_targets": {
        "win32": ["squirrel"],
        "darwin": ["zip"],
        "linux": ["deb","rpm"]
    },
    "electronPackagerConfig": {
        "ignore": [
            "node_modules/sqlite3/build",
            "node_modules/sqlite3/deps",
            "node_modules/sqlite3/src"
        ]
    },
    "electronWinstallerConfig": {
        "name": "eapp",
        "loadingGif": "./assets/img/install-splash.png",
        "iconUrl": "http://manikanta.com/favicon.ico",
        "setupIcon": "./assets/img/icon.ico",
        "noMsi": true
    },
    "electronInstallerDebian": {},
    "electronInstallerRedhat": {}
}

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.

bo-login.js code:

const dao = REMOTE.require('./services/sqlite-dao'); // --> module load error
const cryptoUtils = require('./assets/js/utils/crypto-utils'); // --> module is loaded fine

Here REMOTE is a global property which was set in BrowserWindow.webPreferences.preload.

main.js code:

const win = new BrowserWindow({
    ...
    webPreferences: {
        preload: path.resolve(path.join(__dirname, 'preload.js'))
    }
})

preload.js code:

var _remote = require('electron').remote
process.once('loaded', () => {
    global.REMOTE = _remote
})

Incorrect native scripts builds directory

My app has sqlite3 dependency, which has native scripts. electron-forge is compiling native binaries into node_modules/sqlite3/lib/binding/{node_abi}-{platform}-{arch} directory. But it should be node_modules/sqlite3/lib/binding/electron-v1.4-win32-x64

Repro repo: https://github.com/manikantag/electron-forge-native-binaries-issue

Run npm install and then npm start. You'll see error window, like below:

image

The problem is the native binaries build path is not created with correct values.

Npm install error on Ubuntu with fish shell

When I install this package globally on Ubuntu, it fails with error EACCES: permission denied.
I use fish-shell but there is no config.fish. Even though I changed to bash to run the command, it still didn't work.

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.

sxf@sxf-computer:~$ sudo npm install -g electron-forge
npm WARN deprecated [email protected]: use uuid module instead
npm WARN deprecated [email protected]: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/usr/bin/electron-forge -> /usr/lib/node_modules/electron-forge/dist/electron-forge.js
/usr/bin/forge -> /usr/lib/node_modules/electron-forge/dist/electron-forge.js

> [email protected] install /usr/lib/node_modules/electron-forge
> tabtab install --auto

  tabtab:installer Installing completion script to fish directory +0ms
oh oh Error: EACCES: permission denied, stat '/home/sxf/.config/fish/config.fish'
/usr/lib
└── (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: appdmg@^0.3.2 (node_modules/electron-forge/node_modules/electron-installer-dmg/node_modules/appdmg):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.0-59-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "electron-forge"
npm ERR! node v7.4.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `tabtab install --auto`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'tabtab install --auto'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-forge package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     tabtab install --auto
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs electron-forge
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls electron-forge
npm ERR! There is likely additional logging output above.

What command line arguments are you passing?

sudo npm install -g electron-forge

Add Snap (snapcraft) Maker

See: http://snapcraft.io/

I would rather not have code that calls snap inside of Electron Forge, but rather it should be a separate package like the ones for .deb, .rpm, and Flatpak. (electron-installer-snap?)

Local module installation support?

Please describe your issue:

image

I'm not sure if this is intended usecase or not, so just raising issue for now.
Though I don't think it's frequent usecases, it may possible someone try to install electron-forge as local module and try to use it - is there plan to support those cases? I just gave one quick try and seems path resolution is based on assumption of global installation.

Add an `electron-forge clean` command

Faced an issue with electron-compile

Due to my hard disk getting full, the cache was corrupted
the solution was to remove the cache

I think it would we a good idea to add a clean command to electron-forge

Enhanced debug support

Enhance usage of the debug module so that people can see what's going on if they want 👍

not able to init a project

Please describe your issue:
hi I installed your package and tried to init a new project but I'm getting the following error after running that command

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.

TypeError: ["airbnb","standard"].includes is not a function
    at _callee$ (/usr/local/lib/node_modules/electron-forge/dist/electron-forge-init.js:67:41)
    at tryCatch (/usr/local/lib/node_modules/electron-forge/node_modules/regenerator-runtime/runtime.js:64:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/electron-forge/node_modules/regenerator-runtime/runtime.js:355:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/electron-forge/node_modules/regenerator-runtime/runtime.js:116:21)
    at GeneratorFunctionPrototype.tryCatcher (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/util.js:16:23)
    at PromiseSpawn._promiseFulfilled (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/generators.js:97:49)
    at /usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/generators.js:201:15
    at main (/usr/local/lib/node_modules/electron-forge/dist/electron-forge-init.js:105:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/electron-forge/dist/electron-forge-init.js:109:1)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:146:18)
    at node.js:404:3

What command line arguments are you passing?

electron-forge init forgetest

What does your config.forge data in package.json look like?

does not exist

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.

sudo npm install -g electron-forge (without problems)
electron-forge init forgetest (error)

Porting Electron-Forge from mac to window produces errors using Make

I keep getting these errors when trying to make appx. This is the app I was originally working on on mac and everything worked. So I tried to port it over to windows made sure electron and electron-forge was all installed globally and begin configuring and running and this is what I keep getting. Not sure if its my config or what.

- Making for target: appx - On platform: win32 - For arch: x64
An unhandled exception has occurred inside Forge:
ENOENT: no such file or directory, stat 'C:\Elec\App\out\make\appx\x64\logs\conversion.log'
Error: ENOENT: no such file or directory, stat 'C:\Elec\App\out\make\appx\x64\logs\conversion.log'
    at Error (native)
    at Object.fs.statSync (fs.js:987:18)
    at Tail.watch (C:\Users\prof\AppData\Roaming\npm\node_modules\electron-forge\node_modules\electron-windows-store\lib\vendor\tail.js:88:20)
    at new Tail (C:\Users\prof\AppData\Roaming\npm\node_modules\electron-forge\node_modules\electron-windows-store\lib\vendor\tail.js:79:14)
    at Timeout.setTimeout (C:\Users\prof\AppData\Roaming\npm\node_modules\electron-forge\node_modules\electron-windows-store\lib\convert.js:63:16)
    at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)
    at Timer.listOnTimeout (timers.js:207:5)

Windows store config:

  "windowsStoreConfig": {
        "containerVirtualization": true,
        "platform":"appx",
        "packageName": "App",
        "publisher": "CN=Myappid",
        "windowsKit": "C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x64",
        "desktopConverter": "./DesktopAppConverter",
        "expandedBaseImage": "./DesktopAppConverter/BaseImage-14352",
        "flatten": true,
        "icon":"src/assets/icons/win/icon.ico",
        "packageVersion": "1.1.0.0",
        "packageDisplayName": "App",
        "packageDescription": "My App",
        "packageExecutable": "app/App.exe"
      }

Error when importing 'electron-prebuilt-compile'

I am trying to import my angular 2 electron app and I am receiving an error when installing dependencies

An unhandled error has occurred inside Forge:
Failed to install modules: ["[email protected]"]

With output: npm ERR! Darwin 16.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "[email protected]" "--save-exact" "--save"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5
npm ERR! code ETARGET
....

Loading third party Vue components

This is more a question than a bug, because I'm probably missing something.
I'm using electron-forge with Vue. It works well and the simplicity provided by forge is awesome.
However, whenever I attempt to add a third party component (e.g: graph or datepicker or a grid)
I get this sort of error:

vue.runtime.common.js:521 [Vue warn]: You are using the runtime-only build of Vue where the template option is not available. Either pre-compile the templates into render functions, or use the compiler-included build. (found in component <datepicker>)

I noticed that the vue-template-compiler is installed but it doesn't seem to work on 3rd party components that have templates.

I'm pretty sure I'm the one doing something wrong, but I can't really find a solution.

Any help would be appreciated.

electron-forget publish : Cannot read property 'succeed' of undefined

Unable to publish due to an undefined error.

Command:

DEBUG=electron-forge:* ./node_modules/.bin/electron-forge publish

Output:

WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Checking your system +0ms
  electron-forge:lifecycle Process Succeeded: Checking your system +23ms
  electron-forge:runtime-config setting key: verbose to value: false +13ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Resolving Forge Config +0ms
  electron-forge:project-resolver searching for project in: /Users/stan/Sites/markbook +3ms
  electron-forge:lifecycle Process Started: Resolving Forge Config +5ms
  electron-forge:project-resolver searching for project in: /Users/stan/Sites/markbook +1ms
  electron-forge:project-resolver electron-forge compatible package.json found in /Users/stan/Sites/markbook/package.json +6ms
  electron-forge:project-resolver electron-forge compatible package.json found in /Users/stan/Sites/markbook/package.json +2ms
  electron-forge:lifecycle Process Succeeded: Resolving Forge Config +9ms
We need to package your application before we can make it
  electron-forge:lifecycle Process Started: Preparing to Package Application for arch: x64 +1ms
  electron-forge:project-resolver searching for project in: /Users/stan/Sites/markbook +1ms
  electron-forge:lifecycle Process Succeeded: Resolving Forge Config +2ms
We need to package your application before we can make it
  electron-forge:lifecycle Process Started: Preparing to Package Application for arch: x64 +1ms
  electron-forge:project-resolver searching for project in: /Users/stan/Sites/markbook +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in /Users/stan/Sites/markbook/package.json +1ms
  electron-forge:project-resolver electron-forge compatible package.json found in /Users/stan/Sites/markbook/package.json +0ms

An unhandled rejection has occurred inside Forge:
Cannot read property 'succeed' of undefined
TypeError: Cannot read property 'succeed' of undefined
    at _callee4$ (/Users/stan/Sites/markbook/node_modules/electron-forge/dist/api/package.js:308:28)
    at tryCatch (/Users/stan/Sites/markbook/node_modules/regenerator-runtime/runtime.js:64:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/stan/Sites/markbook/node_modules/regenerator-runtime/runtime.js:355:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/stan/Sites/markbook/node_modules/regenerator-runtime/runtime.js:116:21)
    at GeneratorFunctionPrototype.tryCatcher (/Users/stan/Sites/markbook/node_modules/bluebird/js/release/util.js:16:23)
    at PromiseSpawn._promiseFulfilled (/Users/stan/Sites/markbook/node_modules/bluebird/js/release/generators.js:97:49)
    at Promise._settlePromise (/Users/stan/Sites/markbook/node_modules/bluebird/js/release/promise.js:572:26)
    at Promise._settlePromise0 (/Users/stan/Sites/markbook/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/stan/Sites/markbook/node_modules/bluebird/js/release/promise.js:691:18)
    at Async._drainQueue (/Users/stan/Sites/markbook/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/Users/stan/Sites/markbook/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/Users/stan/Sites/markbook/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:637:20)
    at tryOnImmediate (timers.js:610:5)
    at processImmediate [as _immediateCallback] (timers.js:582:5)

config.forge:

    "forge": {
      "make_targets": {
        "darwin": [
          "zip",
          "dmg"
        ]
      }
    }

This is just a straight forward electron-forge publish. This worked previously, I've only run into this issue since upgrading from 2.2.0 to 2.5.1.

electron-prebuilt-compile depends on a not published package (@paulcbetts/node-sass)

Please describe your issue:
Creating a new project fails when installing dependencies, not really your fault because prebuilt looks to be using Jade that is now deprecated and should use pug.

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.

An unhandled rejection has occurred inside Forge:
Error: Failed to install modules: ["electron-prebuilt-compile"]

With output: npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "electron-prebuilt-compile" "-
-save-exact" "--save-dev"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code E404

npm ERR! 404 Not found : @paulcbetts/node-sass
npm ERR! 404
npm ERR! 404  '@paulcbetts/node-sass' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'electron-compilers'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\electron\forge\test\npm-debug.log

    at ChildProcess.<anonymous> (C:\Users\mike\AppData\Roaming\npm\node_modules\electron-forge\dist\util\install-dependencies.js:64:37)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at ChildProcess.cp.emit (C:\Users\mike\AppData\Roaming\npm\node_modules\electron-forge\node_modules\cross-spawn\lib\enoent.js:40:29)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

What command line arguments are you passing?
None

Put the arguments here

What does your config.forge data in package.json look like?

    "forge": {
      "make_targets": {
        "win32": [
          "squirrel"
        ],
        "darwin": [
          "zip"
        ],
        "linux": [
          "deb",
          "rpm"
        ]
      },
      "electronPackagerConfig": {},
      "electronWinstallerConfig": {
        "name": "test"
      },
      "electronInstallerDebian": {},
      "electronInstallerRedhat": {}
    }

Not sure where this is located.

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.

Signing and adding icns

Didn't know if I should start a new question or continue on the last, but my next questions are:

  1. How do I import my icns for mac? For instance in electron-packager I was using:

--icon=src/assets/icons/mac/icon.icns

  1. How do I go about signing my app for Mac? Do I still need to sign with osx-sign seperately?
    This was my old long tedious script Do I need to import this to forge somehow?:

--osx-sign --app-version='1.0.0' --build-version='1.0.100' --identity='3rd Party Mac Developer Application: TeamName (TeamID)' --app-bundle-id='my.bundle.id' --helper-bundle-id='my.bundle.id.helper' app-category-type=public.app-category.games --entitlements=parent.plist

modules from repositories are ignored when building

Please describe your issue:
I'm linking a module from a git repository
"react-photonkit": "https://github.com/react-photonkit/react-photonkit#master",
everything works as expected if i run electron-forge start but when i run electron-forge make the react-photonkit module is not copied in Electron.app/Contents/Resources/app/node_modules.
After the manual copy the app works as expected
I noticed this happens every time with git modules even if they are linked by one of my modules

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.

>DEBUG=electron-forge:* electron-forge make

> [email protected] make /Users/g3z/Documents/Sviluppo/Node.js/revenue/revenue-gui
> electron-forge make

WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Checking your system +0ms
  electron-forge:lifecycle Process Succeeded: Checking your system +18ms
  electron-forge:runtime-config setting key: verbose to value: false +7ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Resolving Forge Config +0ms
  electron-forge:project-resolver searching for project in: /Users/g3z/Documents/Sviluppo/Node.js/revenue/revenue-gui +2ms
  electron-forge:project-resolver electron-forge compatible package.json found in /Users/g3z/Documents/Sviluppo/Node.js/revenue/revenue-gui/package.json +6ms
  electron-forge:lifecycle Process Succeeded: Resolving Forge Config +6ms
We need to package your application before we can make it
  electron-forge:lifecycle Process Started: Preparing to Package Application for arch: x64 +1ms
  electron-forge:project-resolver searching for project in: /Users/g3z/Documents/Sviluppo/Node.js/revenue/revenue-gui +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in /Users/g3z/Documents/Sviluppo/Node.js/revenue/revenue-gui/package.json +1ms
  electron-forge:packager packaging with options { asar: false,
  overwrite: true,
  afterCopy: [ [Function], [Function], [Function] ],
  afterExtract: [],
  dir: '/Users/g3z/Documents/Sviluppo/Node.js/revenue/revenue-gui',
  arch: 'x64',
  platform: 'darwin',
  out: '/Users/g3z/Documents/Sviluppo/Node.js/revenue/revenue-gui/out',
  electronVersion: '1.4.14',
  quiet: true } +1ms
  electron-forge:lifecycle Process Succeeded: Preparing to Package Application for arch: x64 +9s
  electron-forge:lifecycle Process Started: Compiling Application +2ms
  electron-forge:lifecycle Process Succeeded: Compiling Application +2s
  electron-forge:lifecycle Process Started: Preparing native dependencies +1ms
  electron-forge:lifecycle Process Succeeded: Preparing native dependencies +128ms
  electron-forge:lifecycle Process Started: Packaging Application +0ms
  electron-forge:lifecycle Process Succeeded: Packaging Application +6s
Making for the following targets: zip
  electron-forge:lifecycle Process Started: Making for target: zip - On platform: darwin - For arch: x64 +2ms
  electron-forge:lifecycle Process Succeeded: Making for target: zip - On platform: darwin - For arch: x64 +9s

What command line arguments are you passing?

electron-forge make

What does your config.forge data in package.json look like?

{"config": {
    "forge": {
      "make_targets": {
        "win32": [
          "squirrel"
        ],
        "darwin": [
          "zip"
        ],
        "linux": [
          "deb",
          "rpm"
        ]
      },
      "electronPackagerConfig": {},
      "electronWinstallerConfig": {
        "name": ""
      },
      "electronInstallerDebian": {},
      "electronInstallerRedhat": {},
      "github_repository": {
        "owner": ""
      },
      "windowsStoreConfig": {
        "packageName": ""
      }
    }
  }
}

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.

Creating multiple configs with different platforms

I am trying to create multiple configs for when I package my app, but the way I am attempting is not working.
My config

"electronPackagerConfig": {
        "platform":"mas",
        "icon":"src/assets/icons/mac/icon.icns",
        "asar":true,
        "overwrite":true,
        "app-version":"1.1.0",
        "build-version":"1.0.101"
      },
      "electronPackagerConfig": {
        "platform":"darwin",
        "icon":"src/assets/icons/mac/icon.icns",
        "asar":true,
        "overwrite":true
      },

How can I have both darwin and mas configs in my package.json?

Yarn borks @paulcbetts/node-sass

electron-forge init fails on Windows (at least) atm, because Yarn + native modules still seems to have some glitches:

error C:\Users\paulb\code\electron\electron-compilers\node_modules\@paulcbetts\node-sass: Command failed.
Exit code: 1ing...
Command: C:\WINDOWS\system32\cmd.exe
Arguments: /d /s /c node-gyp rebuild
Directory: C:\Users\paulb\code\electron\electron-compilers\node_modules\@paulcbetts\node-sass
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp http GET https://atom.io/download/atom-shell/v1.4.7/iojs-v1.4.7.tar.gz
gyp http 200 https://atom.io/download/atom-shell/v1.4.7/iojs-v1.4.7.tar.gz
gyp http GET https://atom.io/download/atom-shell/v1.4.7/SHASUMS256.txt
gyp http GET https://atom.io/download/atom-shell/v1.4.7/win-x86/iojs.lib
gyp http GET https://atom.io/download/atom-shell/v1.4.7/win-x64/iojs.lib
gyp http 200 https://atom.io/download/atom-shell/v1.4.7/SHASUMS256.txt
gyp http 200 https://atom.io/download/atom-shell/v1.4.7/win-x86/iojs.lib
gyp http 200 https://atom.io/download/atom-shell/v1.4.7/win-x64/iojs.lib
gyp info spawn C:\Python27\python.EXE
gyp info spawn args [ 'C:\\Users\\paulb\\code\\electron\\electron-compilers\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\paulb\\code\\electron\\electron-compilers\\node_modules\\@paulcbetts\\node-sass\\build\\config.gypi'
,
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\paulb\\code\\electron\\electron-compilers\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\paulb\\.node-gyp\\iojs-1.4.7\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\paulb\\.node-gyp\\iojs-1.4.7',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\paulb\\code\\electron\\electron-compilers\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=iojs.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\paulb\\code\\electron\\electron-compilers\\node_modules\\@paulcbetts\\node-sass',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\paulb\\code\\electron\\electron-compilers\\node_modules\\@paulcbetts\\node-sass\\build',
gyp info spawn args   '-Goutput_dir=.' ]
Traceback (most recent call last):
  File "C:\Users\paulb\code\electron\electron-compilers\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "C:\Users\paulb\code\electron\electron-compilers\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "C:\Users\paulb\code\electron\electron-compilers\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main
    return gyp_main(args)
  File "C:\Users\paulb\code\electron\electron-compilers\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 514, in gyp_main
    options.duplicate_basename_check)
  File "C:\Users\paulb\code\electron\electron-compilers\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 130, in Load
    params['parallel'], params['root_targets'])
  File "C:\Users\paulb\code\electron\electron-compilers\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 2775, in Load
    variables, includes, depth, check, True)
  File "C:\Users\paulb\code\electron\electron-compilers\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 417, in LoadTargetBuildFil
e
    build_file_data, PHASE_EARLY, variables, build_file_path)
  File "C:\Users\paulb\code\electron\electron-compilers\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 1214, in ProcessVariablesA
ndConditionsInDict
    variables, build_file, 'variables')
  File "C:\Users\paulb\code\electron\electron-compilers\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 1225, in ProcessVariablesA
ndConditionsInDict
    'only, found ' + expanded.__class__.__name__ + ' for ' + key)
ValueError: Variable expansion in this context permits str and int only, found long for lastUpdateCheck while trying to load binding.g
yp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\paulb\code\electron\electron-compilers\node_modules\node-gyp\lib\configure.js:30
5:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14986
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\paulb\\code\\electron\\electron-compilers\\node_modules\\node-gyp\\
bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\paulb\code\electron\electron-compilers\node_modules\@paulcbetts\node-sass
gyp ERR! node -v v7.2.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok

`electron-forge package` does not precompile anything

Please describe your issue:
When running electron-forge package, it succeeds with the following messages, but the resulting package does still contain the uncompiled assets:

✔ Checking your system
✔ Preparing to Package Application for arch: x64
✔ Compiling Application
✔ Preparing native dependencies
✔ Packaging Application

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.

➜  vmxr git:(master) ✗ env DEBUG="electron-forge:*" electron-forge package
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Checking your system +0ms
  electron-forge:lifecycle Process Succeeded: Checking your system +25ms
  electron-forge:runtime-config setting key: verbose to value: false +6ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Preparing to Package Application for arch: x64 +0ms
  electron-forge:project-resolver searching for project in: /Users/sash/development/node/vmxr +3ms
  electron-forge:project-resolver electron-forge compatible package.json found in /Users/sash/development/node/vmxr/package.json +6ms
  electron-forge:packager packaging with options { asar: false,
  overwrite: true,
  afterCopy: [ [Function], [Function], [Function] ],
  afterExtract: [],
  dir: '/Users/sash/development/node/vmxr',
  arch: 'x64',
  platform: 'darwin',
  out: '/Users/sash/development/node/vmxr/out',
  electronVersion: '1.4.13',
  quiet: true } +7ms
  electron-forge:lifecycle Process Succeeded: Preparing to Package Application for arch: x64 +2m
  electron-forge:lifecycle Process Started: Compiling Application +3ms
  electron-forge:lifecycle Process Succeeded: Compiling Application +11s
  electron-forge:lifecycle Process Started: Preparing native dependencies +1ms
  electron-forge:lifecycle Process Succeeded: Preparing native dependencies +103ms
  electron-forge:lifecycle Process Started: Packaging Application +0ms
  electron-forge:lifecycle Process Succeeded: Packaging Application +26s

What command line arguments are you passing?

None

What does your config.forge data in package.json look like?

{
  "make_targets": {
    "win32": [
      "squirrel"
    ],
    "darwin": [
      "zip"
    ],
    "linux": [
      "deb",
      "rpm"
    ]
  },
  "electronPackagerConfig": {},
  "electronWinstallerConfig": {
    "name": ""
  },
  "electronInstallerDebian": {},
  "electronInstallerRedhat": {},
  "github_repository": {
    "owner": ""
  },
  "windowsStoreConfig": {
    "packageName": ""
  }
}

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.

AFAIK there's nothing special about my app, so it should happen with every electron-forge initiated app

Ignoring native build directories not working during packaging

Please describe your issue:

I m not able to ignore some directories when packaging the app. I m using sqlite3 module and it'll generate intermediate build directory in node_modules\sqlite3\build path, it is be around 25MB which I don't want to part of the app. Can shave ~25MB of the total app size.

I m ignoring using electronPackagerConfig.ignore, like below:

"electronPackagerConfig" : {
    "ignore": [
        ".vscode",
        "node_modules/sqlite3/build"
    ]
}

But it seems, the electron-package is running before the native build and thus above ignore is of no use. I've seen this behavior by checking the %temp%\electron-package\ directory where the packaging is happening.

To prove the above, .vscode directory is not included in the app.asar as I've it in the ignore list. And similarly, if I use node_modules/sqlite3, then the complete sqlite3 directory is not getting bundled and then I m getting native build failed error which is expected.

Is this the expected order (first package, then build)? If this is the expected order, how to ignore directories which will be created during the native builds?

config.forge data in package.json:

"forge": {
    "make_targets": {
        "win32": ["squirrel"],
        "darwin": ["zip"],
        "linux": ["deb","rpm"]
    },
    "electronPackagerConfig": {
        "ignore": [
            ".vscode",
            "node_modules/sqlite3/build"
        ]
    },
    "electronWinstallerConfig": {
        "name": "electron_forge_demo"
    },
    "electronInstallerDebian": {},
    "electronInstallerRedhat": {}
}

Repro repo: https://github.com/manikantag/electron-forge-native-binaries-issue

Generate package: npm run package
Verify if sqlite3/build is present or not: asar l app.asar | grep build

OS details: Windows 8.1 x64

Upgrade ora to 0.4.0

This gets its own issue because it presents us with an opportunity to refactor our usage of ora to use ora.promise. @MarshallOfSound suggested that the refactor should involve making a helper for the global uncaught rejection idiom currently being used in a number of places.

Problem with non minified CSS files

I m not sure if this is really a electron-forge issue, as I doubt this is an issue with electron-compile itself. But anyway I wanted to confirm.

Please describe your issue:
Non minified CSS files not being loaded properly after package/make. Same are working fine with electron-forge start. And if I use minified CSS files, they are working with package/make too.

Please see this repo to reproduce the issue: https://github.com/manikantag/electron-compile-css-issue

electron-forge start --> will start the app and text will be blinking.
electron-forge package --> open the electron-forge-demo\out\electron-forge-demo-win32-x64\electron-forge-demo.exe file. App will be opened, but text will not be bliking and in the devtools network tab you can something similar to below one.

Use the min.css (https://github.com/manikantag/electron-compile-css-issue/blob/master/src/index.html#L7) and run the electron-forge package and this time text blinks (-> CSS file loaded correctly).

image

Add example CI files to the template

Add example Travis and AppVeyor CI files to the template, to make it easy for someone to automatically build (and release?) their Electron apps for all supported target platforms/arches.

Add public API

As it currently stands, Electron Forge is CLI driven. If you want to interact with it in another Node module, you need to shell out. In order to better integrate with solutions such as ember-electron, we should refactor the logic so that it's accessible via a public (documented) API.

TODO

  • Initialize new empty Application
  • Package for different platforms through electron-compile
  • Lint applications
    • Provide a choice between airbnb and standard linting styles
  • CLI Docs explorer [WIP]
  • Integrate electron-rebuild functionality
  • New electron-forge make command
    • All platforms
      • zip files
    • Windows
      • electron-winstaller --> Squirrel
      • electron-windows-store --> AppX
    • MAS
      • Should operate identically to macOS
    • macOS
      • make DMG packages
    • Linux
      • .deb files
      • .rpm files
      • flatpak files
      • snap files
      • AppImage
  • New electron-forge import command
    • Should prompt (and automate) replacement of electron with electron-prebuild-compile
    • Should prompt (and automate) the installation of electron-compile as dependency
    • Should prompt (and automate) the installation of linting tools if none are present
    • Should prompt the user to remove existing build tooling (babel)
  • New electron-forge getting-started command (This would probably launch an HTML file locally)
    • Briefly explain the purpose of electron-forge
    • Brief descriptions and links to each maker
    • Explanation of the config.forge section of your package.json
    • Automatically prompt to show getting-started on first run
  • Start application
    • Verbose mode with ELECTRON_ENABLE_LOGGING and ELECTRON_ENABLE_STACK_DUMPING set
  • Come up with a standard for providing user-defined options to all the internal packages we use
  • Use the debug module so that people can see what's going on if they want 👍
  • AppVeyor CI support
  • Add example CI files to the template

Config should also be configurable as a JS file path

Basically at the moment we are limiting users of electron-forge to JSON for their config. Which is 99% of the time perfectly fine but these two issues were raised today while demonstrating forge to someone.

  • You can no longer use the afterCopy and afterExtract hooks of -packager as nicely as before
  • Lot's of values will probably be duplicated, it would be nicer to have them as constants in a JS file and export the config from their.

I agree with both of those points so I'd like to propose that the forge config object inside your package.json could also be a file path pointing to a JS file that either exports your config, or a promise resolving with your config.

This wouldn't change much in our code (we already have a helper for fetching the config object) and would allow standard JS functions and variable re-usage across the config options.

/cc @malept

Improve code coverage

Our test coverage is kind of bad (~58% at the time of the creation of this issue). This is, in part, due to the problem that our testsuite is mainly focused on the happy path for most of the functionality. We should fix this.

Debug with VSCode

Please describe your issue:
Unable to start/debug the app using VSCode.

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.

With below launch.json configuration,

"configurations": [
	{
	    "name": "Launch Program",
	    "type": "node",
	    "request": "launch",
	    "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
	    "program": "${workspaceRoot}/es6-init.js",
	    "cwd": "${workspaceRoot}"
	}
]

I m getting below error:

c:\eapp/node_modules/.bin/electron.cmd --debug-brk=21609 --nolazy es6-init.js 

App threw an error duri
ng load
Error: Cannot fi
nd module 'c:\eapp\--debug-brk=21609'
    at Module._resolveFilename (module.js:455:15)
    at Function.Module._resolveFilename (c:\eapp\node_modules\electron-prebuilt-compile\node_modules\electron\dist\resources\electron.asar\common\reset-search-paths.js:35:12)

With below launch.json configuration,

"configurations": [
	{
	    "name": "Launch Program",
	    "type": "node",
	    "request": "launch",
	    "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-forge.cmd",
	    "cwd": "${workspaceRoot}",
	    "args": [
	        "start"
	    ]
	}
]

I m getting below error:

c:\eapp/node_modules/.bin/electron-forge.cmd --debug-brk=41000 --nolazy start 
√ Checking your System
  error: unknown option `--debug-brk'

What command line arguments are you passing?

Can be seen in above section

What does your config.forge data in package.json look like?

"forge": {
    "make_targets": {
        "win32": ["squirrel"],
        "darwin": ["zip"],
        "linux": ["deb","rpm"]
    },
    "electronPackagerConfig": {
        "ignore": [
            "node_modules/sqlite3/build",
            "node_modules/sqlite3/deps",
            "node_modules/sqlite3/src"
        ]
    },
    "electronWinstallerConfig": {
        "name": "eapp",
        "loadingGif": "./assets/img/install-splash.png",
        "iconUrl": "http://manikanta.com/favicon.ico",
        "setupIcon": "./assets/img/icon.ico",
        "noMsi": true
    },
    "electronInstallerDebian": {},
    "electronInstallerRedhat": {}
}

Can you please let me how to configure properly? Thanks.

Request: Please add a electron-forge doctor command

Facing an issue on Windows 10

Not sure of the solution, but i will try re-installing node and elecron-forge later
installing electron-forge again did not solve the issue

I think it wold be a good idea to add a electron-forge doctor command to lint for common issues such as

  • .compilerc file not being present
  • sha of the dependencies is the node_modules folder

Proposal is similar to "brew doctor" command in homebrew

Using Angular 2 wrapped electron app with forge not packaging from

I tried using forge before, but didn't really understand the internals of my app. But now I understand it a little better. When I run electron-forge start or package my app everything packages, but when I try to open I get

Uncaught Exception:
Error: Cannot find module '../PATH/out/App-darwin-x64/App.app/Contents/Resources/app/index.js'
    at Module._resolveFilename (module.js:455:15)
    at Function.Module._resolveFilename (../Path/App-darwin-x64/App.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)

Now I finally understand why this is happening, but can't fix it.
This happend because none of the electron packagers know how to package an Angular 2 app in electron correctly. I was fixing this by running ng build (a angular 2 cli that packs the angular app up before use)
Now this packs it up inside a dist folder with the index.html the maps etc. But in order for electron-packager to work was to copy my main.js inside the dist folder and package the dist up.
Now with electron-forge I cannot figure out how can I package just the dist folder or even use the dist folder as the base of my forge app. Can anyone help, I really would like to use this module.

Error while packaging a JavaScript file not in a subfolder

Im getting this error after I package my app and then try to run it:

Uncaught Exception:
Error: Asked for ...Path/App.app/Contents/Resources/app/main.js but it was not precompiled!
    at FileChangedCache.getHashForPathSync (...Path/out/App-darwin-x64/App.app/Contents/Resources/app/node_modules/electron-compile/lib/file-change-cache.js:249:15)

Any idea onto why this is happening?

no such file for index.js for the main entry in package.json

main in package.json points to "index.js"

But there is no such file. and running require('electron-forge')
gives the error "Error: Cannot find module 'electron-forge'"

I get that electron-forge is a CLI program. so not even sure if this bug is important
but maybe we can remove the entry for main from package.json, if it is not used ?

New getting-started command

This would probably launch an HTML file locally.

Features

  • Briefly explain the purpose of Electron Forge
  • Brief descriptions and links to each maker
  • Explanation of the config.forge section of your package.json
  • Automatically prompt to show getting-started on first run

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.