Git Product home page Git Product logo

electron-forge-templates's Introduction

Electron Forge Templates

This repo helps you to get started with many of the popular web frameworks in Electron, by providing a ready-to-go templates for electron-forge.

How do I try these out?

All of these templates are built-in to electron-forge. All you have to do is install forge, initialize your project and get coding!

npm install -g electron-forge

# react can be swapped out for any of the template names
electron-forge init my-project --template=react

To create an installable package that you can send to people, run:

electron-forge make

Is it really this easy though?

Yes!

Frameworks supported

  • Vue 2.0
  • React
  • React with TypeScript support
  • Angular 2.x

Unsupported frameworks

Coming soon

electron-forge-templates's People

Contributors

anaisbetts avatar bartcich avatar jakenvac avatar kneumei avatar kwonoj avatar malept avatar marshallofsound avatar paarthenon avatar samiskin avatar sierrodc avatar soulchainer 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

electron-forge-templates's Issues

VSCode debug not working for angular2 template

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

I have initialized a new electron-forge project with the angular2 template and wanted to have debugging support from Visual Studio Code. Following the documentation works for the default template, but not for the angular2 template.

After starting the debugging session, the red marked break points are getting grey, what means, that VSCode cannot debug them. I set them in (unmodified) src/index.ts from the template.

It would be great if the VSCode integration would work also for the angular2 template.

Console output when you run electron-forge init with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

gam@GAM-SURFACE3 C:\Users\gam\Downloads\testchen
> electron-forge init test-init
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 +159ms
  electron-forge:runtime-config setting key: verbose to value: false +19ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:init Initializing in: C:\Users\gam\Downloads\testchen\test-init +0ms
  electron-forge:lifecycle Process Started: Initializing Project Directory +3ms
  electron-forge:init:directory creating directory: C:\Users\gam\Downloads\testchen\test-init +2ms
  electron-forge:lifecycle Process Succeeded: Initializing Project Directory +7ms
  electron-forge:lifecycle Process Started: Initializing Git Repository +5ms
  electron-forge:init:git executing "git init" in directory: C:\Users\gam\Downloads\testchen\test-init +2ms
  electron-forge:lifecycle Process Succeeded: Initializing Git Repository +214ms
  electron-forge:lifecycle Process Started: Copying Starter Files +1ms
  electron-forge:init:starter-files creating directory: C:\Users\gam\Downloads\testchen\test-init\src +1ms
  electron-forge:init:starter-files copying "C:\Users\gam\AppData\Roaming\npm\node_modules\electron-forge\tmpl\_gitignore" --> "C:\Users\gam\Downloads\testchen\test-init\.gitignore" +2ms
  electron-forge:init:starter-files copying "C:\Users\gam\AppData\Roaming\npm\node_modules\electron-forge\tmpl\_compilerc" --> "C:\Users\gam\Downloads\testchen\test-init\.compilerc" +4ms
  electron-forge:init:starter-files copying "C:\Users\gam\AppData\Roaming\npm\node_modules\electron-forge\tmpl\_eslintrc" --> "C:\Users\gam\Downloads\testchen\test-init\.eslintrc" +1ms
  electron-forge:init:starter-files copying "C:\Users\gam\AppData\Roaming\npm\node_modules\electron-forge\tmpl\index.js" --> "C:\Users\gam\Downloads\testchen\test-init\src\index.js" +3ms
  electron-forge:init:starter-files copying "C:\Users\gam\AppData\Roaming\npm\node_modules\electron-forge\tmpl\index.html" --> "C:\Users\gam\Downloads\testchen\test-init\src\index.html" +1ms
  electron-forge:lifecycle Process Succeeded: Copying Starter Files +3ms
  electron-forge:lifecycle Process Started: Initializing NPM Module +4ms
  electron-forge:init:npm writing package.json to: C:\Users\gam\Downloads\testchen\test-init +17ms
  electron-forge:lifecycle Process Succeeded: Initializing NPM Module +7ms
  electron-forge:lifecycle Process Started: Installing NPM Dependencies +1ms
  electron-forge:init:npm installing dependencies +2ms
  electron-forge:dependency-installer installing ["electron-compile"] in: C:\Users\gam\Downloads\testchen\test-init dev=false,exact=false,withYarn=false +116ms
  electron-forge:dependency-installer executing ["install","electron-compile","--save"] in: C:\Users\gam\Downloads\testchen\test-init +0ms
  electron-forge:runtime-config fetching key verbose +1ms
  electron-forge:runtime-config fetching key verbose +44ms
  electron-forge:init:npm installing devDependencies +15s
  electron-forge:dependency-installer installing ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator"] in: C:\Users\gam\Downloads\testchen\test-init dev=true,exact=false,withYarn=false +1ms
  electron-forge:dependency-installer executing ["install","babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","--save-dev"] in: C:\Users\gam\Downloads\testchen\test-init +1ms
  electron-forge:runtime-config fetching key verbose +1ms
  electron-forge:runtime-config fetching key verbose +53ms
  electron-forge:init:npm installing exact dependencies +19s
  electron-forge:dependency-installer installing ["electron-prebuilt-compile"] in: C:\Users\gam\Downloads\testchen\test-init dev=true,exact=true,withYarn=false +1ms
  electron-forge:dependency-installer executing ["install","electron-prebuilt-compile","--save-exact","--save-dev"] in: C:\Users\gam\Downloads\testchen\test-init +0ms
  electron-forge:runtime-config fetching key verbose +1ms
  electron-forge:runtime-config fetching key verbose +70ms
  electron-forge:init:npm installing airbnb linting dependencies +1m
  electron-forge:dependency-installer installing ["eslint","eslint-config-airbnb","eslint-plugin-import","eslint-plugin-jsx-a11y@^3.0.0","eslint-plugin-react"] in: C:\Users\gam\Downloads\testchen\test-init dev=true,exact=false,withYarn=false +0ms
  electron-forge:dependency-installer executing ["install","eslint","eslint-config-airbnb","eslint-plugin-import","eslint-plugin-jsx-a11y@^3.0.0","eslint-plugin-react","--save-dev"] in: C:\Users\gam\Downloads\testchen\test-init +1ms
  electron-forge:runtime-config fetching key verbose +1ms
  electron-forge:runtime-config fetching key verbose +57ms
  electron-forge:lifecycle Process Succeeded: Installing NPM Dependencies +35s
gam@GAM-SURFACE3 C:\Users\gam\Downloads\testchen
> electron-forge init test-init-angular2 --template=angular2
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 +171ms
  electron-forge:runtime-config setting key: verbose to value: false +26ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:init Initializing in: C:\Users\gam\Downloads\testchen\test-init-angular2 +0ms
  electron-forge:lifecycle Process Started: Initializing Project Directory +3ms
  electron-forge:init:directory creating directory: C:\Users\gam\Downloads\testchen\test-init-angular2 +2ms
  electron-forge:lifecycle Process Succeeded: Initializing Project Directory +9ms
  electron-forge:lifecycle Process Started: Initializing Git Repository +1ms
  electron-forge:init:git executing "git init" in directory: C:\Users\gam\Downloads\testchen\test-init-angular2 +2ms
  electron-forge:lifecycle Process Succeeded: Initializing Git Repository +206ms
  electron-forge:lifecycle Process Started: Copying Starter Files +1ms
  electron-forge:init:starter-files creating directory: C:\Users\gam\Downloads\testchen\test-init-angular2\src +1ms
  electron-forge:init:starter-files copying "C:\Users\gam\AppData\Roaming\npm\node_modules\electron-forge\tmpl\_gitignore" --> "C:\Users\gam\Downloads\testchen\test-init-angular2\.gitignore" +2ms
  electron-forge:init:starter-files copying "C:\Users\gam\AppData\Roaming\npm\node_modules\electron-forge\tmpl\_compilerc" --> "C:\Users\gam\Downloads\testchen\test-init-angular2\.compilerc" +2ms
  electron-forge:init:starter-files copying "C:\Users\gam\AppData\Roaming\npm\node_modules\electron-forge\tmpl\index.js" --> "C:\Users\gam\Downloads\testchen\test-init-angular2\src\index.js" +1ms
  electron-forge:init:starter-files copying "C:\Users\gam\AppData\Roaming\npm\node_modules\electron-forge\tmpl\index.html" --> "C:\Users\gam\Downloads\testchen\test-init-angular2\src\index.html" +1ms
  electron-forge:lifecycle Process Succeeded: Copying Starter Files +2ms
  electron-forge:lifecycle Process Started: Initializing NPM Module +3ms
  electron-forge:init:npm writing package.json to: C:\Users\gam\Downloads\testchen\test-init-angular2 +11ms
  electron-forge:lifecycle Process Succeeded: Initializing NPM Module +4ms
  electron-forge:lifecycle Process Started: Installing NPM Dependencies +1ms
  electron-forge:init:npm installing dependencies +2ms
  electron-forge:dependency-installer installing ["electron-compile"] in: C:\Users\gam\Downloads\testchen\test-init-angular2 dev=false,exact=false,withYarn=false +108ms
  electron-forge:dependency-installer executing ["install","electron-compile","--save"] in: C:\Users\gam\Downloads\testchen\test-init-angular2 +1ms
  electron-forge:runtime-config fetching key verbose +1ms
  electron-forge:runtime-config fetching key verbose +39ms
  electron-forge:init:npm installing devDependencies +18s
  electron-forge:dependency-installer installing ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator"] in: C:\Users\gam\Downloads\testchen\test-init-angular2 dev=true,exact=false,withYarn=false +1ms
  electron-forge:dependency-installer executing ["install","babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","--save-dev"] in: C:\Users\gam\Downloads\testchen\test-init-angular2 +1ms
  electron-forge:runtime-config fetching key verbose +0ms
  electron-forge:runtime-config fetching key verbose +40ms
  electron-forge:init:npm installing exact dependencies +21s
  electron-forge:dependency-installer installing ["electron-prebuilt-compile"] in: C:\Users\gam\Downloads\testchen\test-init-angular2 dev=true,exact=true,withYarn=false +1ms
  electron-forge:dependency-installer executing ["install","electron-prebuilt-compile","--save-exact","--save-dev"] in: C:\Users\gam\Downloads\testchen\test-init-angular2 +1ms
  electron-forge:runtime-config fetching key verbose +1ms
  electron-forge:runtime-config fetching key verbose +45ms
  electron-forge:init:npm not installing linting deps +56s
  electron-forge:lifecycle Process Succeeded: Installing NPM Dependencies +19ms
  electron-forge:lifecycle Process Started: Locating custom template: "angular2" +2ms
  electron-forge:init:custom using local template +106ms
  electron-forge:lifecycle Process Succeeded: Locating custom template: "angular2" +1ms
  electron-forge:lifecycle Process Started: Installing Template Dependencies +3ms
  electron-forge:init:custom installing dependencies +1ms
  electron-forge:dependency-installer installing ["@angular/common@^2.4.1","@angular/compiler@^2.4.1","@angular/core@^2.4.1","@angular/platform-browser@^2.4.1","@angular/platform-browser-dynamic@^2.4.1","@types/electron@^1.4.30","electron-devtools-installer@^2.0.1","reflect-metadata@^0.1.9","tslib@^1.4.0","zone.js@^0.7.4"] in: C:\Users\gam\Downloads\testchen\test-init-angular2 dev=false,exact=false,withYarn=false +1ms
  electron-forge:dependency-installer executing ["install","@angular/common@^2.4.1","@angular/compiler@^2.4.1","@angular/core@^2.4.1","@angular/platform-browser@^2.4.1","@angular/platform-browser-dynamic@^2.4.1","@types/electron@^1.4.30","electron-devtools-installer@^2.0.1","reflect-metadata@^0.1.9","tslib@^1.4.0","zone.js@^0.7.4","--save"] in: C:\Users\gam\Downloads\testchen\test-init-angular2 +0ms
  electron-forge:runtime-config fetching key verbose +1ms
  electron-forge:runtime-config fetching key verbose +56ms
  electron-forge:init:custom installing devDependencies +22s
  electron-forge:dependency-installer installing ["tslint@^4.2.0","typescript@~2.1.4"] in: C:\Users\gam\Downloads\testchen\test-init-angular2 dev=true,exact=false,withYarn=false +0ms
  electron-forge:dependency-installer executing ["install","tslint@^4.2.0","typescript@~2.1.4","--save-dev"] in: C:\Users\gam\Downloads\testchen\test-init-angular2 +1ms
  electron-forge:runtime-config fetching key verbose +1ms
  electron-forge:runtime-config fetching key verbose +51ms
  electron-forge:lifecycle Process Succeeded: Installing Template Dependencies +25s
  electron-forge:lifecycle Process Started: Copying Template Files +1ms
  electron-forge:init:starter-files copying "C:/Users/gam/AppData/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-angular2/tmpl/_compilerc" --> "C:\Users\gam\Downloads\testchen\test-init-angular2\.compilerc" +21ms
  electron-forge:init:starter-files copying "C:/Users/gam/AppData/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-angular2/tmpl/src/app.component.ts" --> "C:\Users\gam\Downloads\testchen\test-init-angular2\src\app.component.ts" +8ms
  electron-forge:init:starter-files copying "C:/Users/gam/AppData/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-angular2/tmpl/src/bootstrap.ts" --> "C:\Users\gam\Downloads\testchen\test-init-angular2\src\bootstrap.ts" +7ms
  electron-forge:init:starter-files copying "C:/Users/gam/AppData/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-angular2/tmpl/src/index.html" --> "C:\Users\gam\Downloads\testchen\test-init-angular2\src\index.html" +3ms
  electron-forge:init:starter-files copying "C:/Users/gam/AppData/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-angular2/tmpl/src/index.ts" --> "C:\Users\gam\Downloads\testchen\test-init-angular2\src\index.ts" +4ms
  electron-forge:init:starter-files copying "C:/Users/gam/AppData/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-angular2/tmpl/tsconfig.json" --> "C:\Users\gam\Downloads\testchen\test-init-angular2\tsconfig.json" +4ms
  electron-forge:init:starter-files copying "C:/Users/gam/AppData/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-angular2/tmpl/tslint.json" --> "C:\Users\gam\Downloads\testchen\test-init-angular2\tslint.json" +7ms
  electron-forge:lifecycle Process Succeeded: Copying Template Files +3ms

What command line arguments are you passing?

Please see above answer

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

Didn't changed from template

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem.

electron-forge init test-init-angular2 --template=angular2
npm install --save-dev electron-forge

Copy launch.json configuration from documentation. Comment the array runtimeArgs.

Hit F5 after setting some break points in src/index.ts.

As soon as the app is started, the break points turn grey. Break points don't work in src/index.ts.

With the default template, the break points work without issue.

Pre-processors import (Sass/Less) not working

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:
I am using the react template and as the major issue that I am facing is in regard to pre-processors. In the electron compile doc it shows to just include the sass files in the index.html file and electron compile would compile it. But that's not working for me and I am not exactly sure what the issue is either as I am not getting any errors from electron-compile. My guess would be electron compile isn't doing anything with the link tag where I am linking the sass file. So, how do I move forward and fix it?

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

react-typescript template has inconsistent line endings

On a Macbook, running:

electron-forge init my-forge-project --template=react-typescript
cd my-forge-project
git add .
git diff --cached

Shows that the following files have CRLF line endings:

.compilerc
src/app.tsx
src/index.html
src/index.ts
tsconfig.json
tslint.json

While the following file has LF line endings:

package.json
.gitignore

[request] Add Inferno template

Could we have an inferno template for electron-forge?

I'm not sure exactly where to start to make one, if someone could point me in the right direction that would be great. ๐Ÿ‘

Add angular-1.x template

The README mentions as a supported framework so it would be good to get a super basic example in here

mkdir Error on React built app's setup

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:
Projects using the react template attempt a mkdir on the extensions directory before the app's directory is created. Happening on OSX and Windows. Using the default ES6/7 template doesn't error. Below is a Windows screenshot.

image

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.

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 +1s
  electron-forge:runtime-config setting key: verbose to value: false +0ms
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: C:\CQL_Work\CQL_Labs\electron-forge-playground +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in C:\CQL_Work\CQL_Labs\electron-forge-playground\package.json +6ms
  electron-forge:lifecycle Process Succeeded: Resolving Forge Config +16ms
  electron-forge:require-search searching [ '../makers/win32/squirrel.js',
  '../makers/generic/squirrel.js',
  'electron-forge-maker-squirrel',
  'squirrel',
  'C:\\CQL_Work\\CQL_Labs\\electron-forge-playground\\squirrel',
  'C:\\CQL_Work\\CQL_Labs\\electron-forge-playground\\node_modules\\squirrel',
  'C:\\Users\\christopher.davis\\AppData\\Roaming\\nvm\\v8.5.0\\node_modules\\electron-forge\\dist\\makers\\win32\\squirrel.js',
  'C:\\Users\\christopher.davis\\AppData\\Roaming\\nvm\\v8.5.0\\node_modules\\electron-forge\\dist\\makers\\generic\\squirrel.js',
  'C:\\Users\\christopher.davis\\AppData\\Roaming\\nvm\\v8.5.0\\node_modules\\electron-forge\\dist\\api\\electron-forge-maker-squirrel',
  'C:\\Users\\christopher.davis\\AppData\\Roaming\\nvm\\v8.5.0\\node_modules\\electron-forge\\dist\\api\\squirrel',
  'C:\\CQL_Work\\CQL_Labs\\electron-forge-playground\\squirrel',
  'C:\\CQL_Work\\CQL_Labs\\electron-forge-playground\\node_modules\\squirrel',
  'C:\\Users\\christopher.davis\\AppData\\Roaming\\nvm\\v8.5.0\\node_modules\\electron-forge\\dist\\api\\makers\\win32\\squirrel.js',
  'C:\\Users\\christopher.davis\\AppData\\Roaming\\nvm\\v8.5.0\\node_modules\\electron-forge\\dist\\api\\makers\\generic\\squirrel.js',
  'C:\\Users\\christopher.davis\\AppData\\Roaming\\nvm\\v8.5.0\\node_modules\\electron-forge\\dist\\api\\node_modules\\electron-forge-maker-squirrel',
  'C:\\Users\\christopher.davis\\AppData\\Roaming\\nvm\\v8.5.0\\node_modules\\electron-forge\\dist\\api\\node_modules\\squirrel',
  'C:\\CQL_Work\\CQL_Labs\\electron-forge-playground\\squirrel',
  'C:\\CQL_Work\\CQL_Labs\\electron-forge-playground\\node_modules\\squirrel' ] relative to C:\Users\christopher.davis\AppData\Roaming\nvm\v8.5.0\node_modules\electron-forge\dist\api +0ms
  electron-forge:require-search testing ../makers/win32/squirrel.js +3ms
We need to package your application before we can make it
  electron-forge:lifecycle Process Started: Preparing to Package Application for arch: x64 +84ms
  electron-forge:project-resolver searching for project in: C:\CQL_Work\CQL_Labs\electron-forge-playground +92ms
  electron-forge:project-resolver electron-forge compatible package.json found in C:\CQL_Work\CQL_Labs\electron-forge-playground\package.json +1ms
  electron-forge:hook could not find hook: generateAssets +0ms
  electron-forge:hook could not find hook: prePackage +0ms
  electron-forge:packager packaging with options { asar: false,
  overwrite: true,
  packageManager: 'yarn',
  afterCopy: [ [Function], [Function], [Function], [Function] ],
  afterExtract: [],
  dir: 'C:\\CQL_Work\\CQL_Labs\\electron-forge-playground',
  arch: 'x64',
  platform: 'win32',
  out: 'C:\\CQL_Work\\CQL_Labs\\electron-forge-playground\\out',
  electronVersion: '1.7.6',
  quiet: true } +0ms
  electron-forge:lifecycle Process Succeeded: Preparing to Package Application for arch: x64 +19s
  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 +2s
  electron-forge:lifecycle Process Started: Packaging Application +0ms
  electron-forge:hook could not find hook: postPackage +40s
  electron-forge:lifecycle Process Succeeded: Packaging Application +18s
Making for the following targets:
  electron-forge:hook could not find hook: preMake +2ms
  electron-forge:lifecycle Process Started: Making for target: squirrel - On platform: win32 - For arch: x64 +4ms
  electron-forge:lifecycle Process Succeeded: Making for target: squirrel - On platform: win32 - For arch: x64 +2m
  electron-forge:hook could not find hook: postMake +2m

What command line arguments are you passing?

none

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

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

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.

Just running electron-forge init --template=react and then electron-forge make was enough to trigger this error when running the built setup.exe.

angular update?

why is this template running on angular 2 instead of 6 or 7?

electron-forge lint gives no output when errors are present

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:
Running electron-forge lint gives no output when lint errors are present.
While npm run lint or tslint --project tsconfig.json --type-check --force (from lint script in package.json) shows them correctly.

Console output when you run electron-forge init with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

electron-forge init my-new-project --template=react-typescript
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 +214ms
  electron-forge:runtime-config setting key: verbose to value: false +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:init Initializing in: /Users/user/Projects/my-new-project +0ms
  electron-forge:lifecycle Process Started: Initializing Project Directory +0ms
  electron-forge:init:directory creating directory: /Users/user/Projects/my-new-project +0ms
  electron-forge:lifecycle Process Succeeded: Initializing Project Directory +3ms
  electron-forge:lifecycle Process Started: Initializing Git Repository +1ms
  electron-forge:init:git executing "git init" in directory: /Users/user/Projects/my-new-project +0ms
  electron-forge:lifecycle Process Succeeded: Initializing Git Repository +18ms
  electron-forge:lifecycle Process Started: Copying Starter Files +1ms
  electron-forge:init:starter-files creating directory: /Users/user/Projects/my-new-project/src +0ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/_gitignore" --> "/Users/user/Projects/my-new-project/.gitignore" +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/_compilerc" --> "/Users/user/Projects/my-new-project/.compilerc" +5ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/index.js" --> "/Users/user/Projects/my-new-project/src/index.js" +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/index.html" --> "/Users/user/Projects/my-new-project/src/index.html" +1ms
  electron-forge:lifecycle Process Succeeded: Copying Starter Files +9ms
  electron-forge:lifecycle Process Started: Initializing NPM Module +0ms
  electron-forge:init:npm writing package.json to: /Users/user/Projects/my-new-project +0ms
  electron-forge:lifecycle Process Succeeded: Initializing NPM Module +6ms
  electron-forge:lifecycle Process Started: Installing NPM Dependencies +1ms
  electron-forge:init:npm installing dependencies +2ms
  electron-forge:dependency-installer installing ["electron-compile","electron-squirrel-startup"] in: /Users/user/Projects/my-new-project dev=false,exact=false,withYarn=false +0ms
  electron-forge:dependency-installer executing ["install","electron-compile","electron-squirrel-startup","--save"] in: /Users/user/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +0ms
  electron-forge:init:npm installing devDependencies +6s
  electron-forge:dependency-installer installing ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge"] in: /Users/user/Projects/my-new-project dev=true,exact=false,withYarn=false +6s
  electron-forge:dependency-installer executing ["install","babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge","--save-dev"] in: /Users/user/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +6s
  electron-forge:init:npm installing exact dependencies +30s
  electron-forge:dependency-installer installing ["electron-prebuilt-compile"] in: /Users/user/Projects/my-new-project dev=true,exact=true,withYarn=false +30s
  electron-forge:dependency-installer executing ["install","electron-prebuilt-compile","--save-exact","--save-dev"] in: /Users/user/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +30s
  electron-forge:init:npm not installing linting deps +16s
  electron-forge:lifecycle Process Succeeded: Installing NPM Dependencies +52s
  electron-forge:lifecycle Process Started: Locating custom template: "react-typescript" +2ms
  electron-forge:init:custom using local template +0ms
  electron-forge:lifecycle Process Succeeded: Locating custom template: "react-typescript" +3ms
  electron-forge:lifecycle Process Started: Installing Template Dependencies +1ms
  electron-forge:init:custom installing dependencies +1ms
  electron-forge:dependency-installer installing ["react@^15.4.1","react-dom@^15.4.1","@types/react@^0.14.55","@types/react-dom@^0.14.20","@types/electron-devtools-installer@^2.0.2","electron-devtools-installer@^2.1.0","react-hot-loader@^3.0.0-beta.6","tslib@^1.4.0"] in: /Users/user/Projects/my-new-project dev=false,exact=false,withYarn=false +16s
  electron-forge:dependency-installer executing ["install","react@^15.4.1","react-dom@^15.4.1","@types/react@^0.14.55","@types/react-dom@^0.14.20","@types/electron-devtools-installer@^2.0.2","electron-devtools-installer@^2.1.0","react-hot-loader@^3.0.0-beta.6","tslib@^1.4.0","--save"] in: /Users/user/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +16s
  electron-forge:init:custom installing devDependencies +8s
  electron-forge:dependency-installer installing ["tslint@^5.1.0","typescript@~2.2.2"] in: /Users/user/Projects/my-new-project dev=true,exact=false,withYarn=false +8s
  electron-forge:dependency-installer executing ["install","tslint@^5.1.0","typescript@~2.2.2","--save-dev"] in: /Users/user/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +8s
  electron-forge:lifecycle Process Succeeded: Installing Template Dependencies +14s
  electron-forge:lifecycle Process Started: Copying Template Files +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/_compilerc" --> "/Users/user/Projects/my-new-project/.compilerc" +1m
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/src/app.tsx" --> "/Users/user/Projects/my-new-project/src/app.tsx" +2ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/src/index.html" --> "/Users/user/Projects/my-new-project/src/index.html" +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/src/index.ts" --> "/Users/user/Projects/my-new-project/src/index.ts" +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/tsconfig.json" --> "/Users/user/Projects/my-new-project/tsconfig.json" +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/tslint.json" --> "/Users/user/Projects/my-new-project/tslint.json" +1ms
  electron-forge:lifecycle Process Succeeded: Copying Template Files +21ms

What command line arguments are you passing?

electron-forge init my-new-project --template=react-typescript

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

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

Steps to reproduce:
1 . electron-forge init my-new-project --template=react-typescript
2. Remove braces from if (isDevMode) in index.ts
3. cd my-new-project
4. electron-forge lint

Saw #29, but typescript+react part is merged #31.

Sass: Imported partials not recompiling on change

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

I am trying to use Sass's @import in order to keep variables across multiple Sass files. I have a _variables.scss file as follows:

$colour: #000;

I then have an index.scss file, in the same directory, in which I would like to use this variable in the following way:

@import "variables";
    
body {
    background: $colour;
}

I then can import my index.scss file in index.html like so (both sass files are in the styles folder):

<link rel="stylesheet" href="styles/index.scss">

This works and the background becomes black. The problem arises however when I change the _variables.scss file to be this for example:

$colour: #fff;

The background doesn't update to become white in this case.

The issue is essentially that changes to Sass partial files are not refleced when their contents are changed. Updates are quite alright with regular files not beginning with an underscore like index.scss.

It may be worth noting that I see the following message when running my app in the debug mode:

electron-forge:hook could not find hook: generateAssets +0ms

I hope this is all clear, many thanks in advance!

electron-forge lint error

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:
After init project with react+typescript template lint gives an error.

Console output when you run electron-forge init with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

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 +446ms
  electron-forge:runtime-config setting key: verbose to value: false +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:init Initializing in: /Users/me/Projects/my-new-project +0ms
  electron-forge:lifecycle Process Started: Initializing Project Directory +0ms
  electron-forge:init:directory creating directory: /Users/me/Projects/my-new-project +0ms
  electron-forge:lifecycle Process Succeeded: Initializing Project Directory +3ms
  electron-forge:lifecycle Process Started: Initializing Git Repository +1ms
  electron-forge:init:git executing "git init" in directory: /Users/me/Projects/my-new-project +0ms
  electron-forge:lifecycle Process Succeeded: Initializing Git Repository +15ms
  electron-forge:lifecycle Process Started: Copying Starter Files +1ms
  electron-forge:init:starter-files creating directory: /Users/me/Projects/my-new-project/src +0ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/_gitignore" --> "/Users/me/Projects/my-new-project/.gitignore" +0ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/_compilerc" --> "/Users/me/Projects/my-new-project/.compilerc" +5ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/index.js" --> "/Users/me/Projects/my-new-project/src/index.js" +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/index.html" --> "/Users/me/Projects/my-new-project/src/index.html" +1ms
  electron-forge:lifecycle Process Succeeded: Copying Starter Files +8ms
  electron-forge:lifecycle Process Started: Initializing NPM Module +1ms
  electron-forge:init:npm writing package.json to: /Users/me/Projects/my-new-project +0ms
  electron-forge:lifecycle Process Succeeded: Initializing NPM Module +7ms
  electron-forge:lifecycle Process Started: Installing NPM Dependencies +0ms
  electron-forge:init:npm installing dependencies +2ms
  electron-forge:dependency-installer installing ["electron-compile"] in: /Users/me/Projects/my-new-project dev=false,exact=false,withYarn=false +0ms
  electron-forge:dependency-installer executing ["install","electron-compile","--save"] in: /Users/me/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +0ms
  electron-forge:init:npm installing devDependencies +4s
  electron-forge:dependency-installer installing ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge"] in: /Users/me/Projects/my-new-project dev=true,exact=false,withYarn=false +4s
  electron-forge:dependency-installer executing ["install","babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge","--save-dev"] in: /Users/me/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +4s
  electron-forge:init:npm installing exact dependencies +15s
  electron-forge:dependency-installer installing ["electron-prebuilt-compile"] in: /Users/me/Projects/my-new-project dev=true,exact=true,withYarn=false +15s
  electron-forge:dependency-installer executing ["install","electron-prebuilt-compile","--save-exact","--save-dev"] in: /Users/me/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +15s
  electron-forge:init:npm not installing linting deps +10s
  electron-forge:lifecycle Process Succeeded: Installing NPM Dependencies +29s
  electron-forge:lifecycle Process Started: Locating custom template: "react-typescript" +1ms
  electron-forge:init:custom using local template +0ms
  electron-forge:lifecycle Process Succeeded: Locating custom template: "react-typescript" +3ms
  electron-forge:lifecycle Process Started: Installing Template Dependencies +0ms
  electron-forge:init:custom installing dependencies +1ms
  electron-forge:dependency-installer installing ["react@^15.4.1","react-dom@^15.4.1","@types/electron@^1.4.30","@types/react@^0.14.55","@types/react-dom@^0.14.20","@types/electron-devtools-installer@^2.0.2","electron-devtools-installer@^2.0.1","react-hot-loader@^3.0.0-beta.6","tslib@^1.4.0"] in: /Users/me/Projects/my-new-project dev=false,exact=false,withYarn=false +10s
  electron-forge:dependency-installer executing ["install","react@^15.4.1","react-dom@^15.4.1","@types/electron@^1.4.30","@types/react@^0.14.55","@types/react-dom@^0.14.20","@types/electron-devtools-installer@^2.0.2","electron-devtools-installer@^2.0.1","react-hot-loader@^3.0.0-beta.6","tslib@^1.4.0","--save"] in: /Users/me/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +10s
  electron-forge:init:custom installing devDependencies +9s
  electron-forge:dependency-installer installing ["tslint@^5.1.0","typescript@~2.2.2"] in: /Users/me/Projects/my-new-project dev=true,exact=false,withYarn=false +9s
  electron-forge:dependency-installer executing ["install","tslint@^5.1.0","typescript@~2.2.2","--save-dev"] in: /Users/me/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +9s
  electron-forge:lifecycle Process Succeeded: Installing Template Dependencies +14s
  electron-forge:lifecycle Process Started: Copying Template Files +0ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/_compilerc" --> "/Users/me/Projects/my-new-project/.compilerc" +44s
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/src/app.tsx" --> "/Users/me/Projects/my-new-project/src/app.tsx" +3ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/src/index.html" --> "/Users/me/Projects/my-new-project/src/index.html" +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/src/index.ts" --> "/Users/me/Projects/my-new-project/src/index.ts" +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/tsconfig.json" --> "/Users/me/Projects/my-new-project/tsconfig.json" +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/tslint.json" --> "/Users/me/Projects/my-new-project/tslint.json" +1ms
  electron-forge:lifecycle Process Succeeded: Copying Template Files +24ms

What command line arguments are you passing?

electron-forge init my-new-project --template=react-typescript

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

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

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem.

Steps to reproduce:
1 . electron-forge init my-new-project --template=react-typescript
2. cd my-new-project
3. electron-forge lint

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 +432ms
  electron-forge:runtime-config setting key: verbose to value: false +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Linting Application +0ms
  electron-forge:project-resolver searching for project in: /Users/me/Projects/my-new-project +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in /Users/me/Projects/my-new-project/package.json +4ms
  electron-forge:lint executing "run lint -- --color" in dir: /Users/me/Projects/my-new-project +0ms
  electron-forge:lifecycle Process Failed: Linting Application +1s
  electron-forge:lifecycle Process Succeeded: Linting Application +1ms

An unhandled rejection has occurred inside Forge:

> [email protected] lint /Users/me/Projects/my-new-project
> tslint --project tsconfig.json --type-check --force "--color"


  error: unknown option `--color'

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] lint: `tslint --project tsconfig.json --type-check --force "--color"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/me/.npm/_logs/2017-09-08T11_49_06_553Z-debug.log

Failed with exit code: 1
Error:
> [email protected] lint /Users/me/Projects/my-new-project
> tslint --project tsconfig.json --type-check --force "--color"


  error: unknown option `--color'

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] lint: `tslint --project tsconfig.json --type-check --force "--color"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/me/.npm/_logs/2017-09-08T11_49_06_553Z-debug.log

Failed with exit code: 1
    at SafeSubscriber._error (/usr/local/lib/node_modules/electron-forge/node_modules/spawn-rx/lib/src/index.js:267:84)
    at SafeSubscriber.__tryOrUnsub (/usr/local/lib/node_modules/electron-forge/node_modules/rxjs/Subscriber.js:238:16)
    at SafeSubscriber.error (/usr/local/lib/node_modules/electron-forge/node_modules/rxjs/Subscriber.js:197:26)
    at Subscriber._error (/usr/local/lib/node_modules/electron-forge/node_modules/rxjs/Subscriber.js:128:26)
    at Subscriber.error (/usr/local/lib/node_modules/electron-forge/node_modules/rxjs/Subscriber.js:102:18)
    at MapSubscriber.Subscriber._error (/usr/local/lib/node_modules/electron-forge/node_modules/rxjs/Subscriber.js:128:26)
    at MapSubscriber.Subscriber.error (/usr/local/lib/node_modules/electron-forge/node_modules/rxjs/Subscriber.js:102:18)
    at SafeSubscriber._next (/usr/local/lib/node_modules/electron-forge/node_modules/spawn-rx/lib/src/index.js:241:65)
    at SafeSubscriber.__tryOrUnsub (/usr/local/lib/node_modules/electron-forge/node_modules/rxjs/Subscriber.js:238:16)
    at SafeSubscriber.next (/usr/local/lib/node_modules/electron-forge/node_modules/rxjs/Subscriber.js:185:22)
    at Subscriber._next (/usr/local/lib/node_modules/electron-forge/node_modules/rxjs/Subscriber.js:125:26)
    at Subscriber.next (/usr/local/lib/node_modules/electron-forge/node_modules/rxjs/Subscriber.js:89:18)
    at ReduceSubscriber._complete (/usr/local/lib/node_modules/electron-forge/node_modules/rxjs/operator/reduce.js:119:30)
    at ReduceSubscriber.Subscriber.complete (/usr/local/lib/node_modules/electron-forge/node_modules/rxjs/Subscriber.js:114:18)
    at MergeAllSubscriber.notifyComplete (/usr/local/lib/node_modules/electron-forge/node_modules/rxjs/operator/mergeAll.js:105:30)
    at InnerSubscriber._complete (/usr/local/lib/node_modules/electron-forge/node_modules/rxjs/InnerSubscriber.js:30:21)

2017-09-08T11_49_06_553Z-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/8.4.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'lint',
1 verbose cli   '--',
1 verbose cli   '--color' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prelint', 'lint', 'postlint' ]
5 info lifecycle [email protected]~prelint: [email protected]
6 info lifecycle [email protected]~lint: [email protected]
7 verbose lifecycle [email protected]~lint: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~lint: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/me/Projects/my-new-project/node_modules/.bin:/Users/me/Library/Android/sdk/platform-tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle [email protected]~lint: CWD: /Users/me/Projects/my-new-project
10 silly lifecycle [email protected]~lint: Args: [ '-c',
10 silly lifecycle   'tslint --project tsconfig.json --type-check --force "--color"' ]
11 silly lifecycle [email protected]~lint: Returned: code: 1  signal: null
12 info lifecycle [email protected]~lint: Failed to exec lint script
13 verbose stack Error: [email protected] lint: `tslint --project tsconfig.json --type-check --force "--color"`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at EventEmitter.emit (events.js:213:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at ChildProcess.emit (events.js:213:7)
13 verbose stack     at maybeClose (internal/child_process.js:927:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/me/Projects/my-new-project
16 verbose Darwin 16.7.0
17 verbose argv "/usr/local/Cellar/node/8.4.0/bin/node" "/usr/local/bin/npm" "run" "lint" "--" "--color"
18 verbose node v8.4.0
19 verbose npm  v5.4.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] lint: `tslint --project tsconfig.json --type-check --force "--color"`
22 error Exit status 1
23 error Failed at the [email protected] lint script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Add ESLint support to React template

Just as #9, React template needs ESLint support out of the box.

It has the .eslintrc file ok, but it's simply unused without the eslint packages. And, of course, like in the mentionated issue, the generated package.json contains:

  "lint": "echo \"No linting configured\""

Most peculiar thing about this?

The default "Vanilla ES6/7" template, that doesn't need it, installs the devDependencies that the React template needs and don't have. Just copy pasted from a generated "Vanilla ES6/7" package.json:

"devDependencies": {
        "babel-plugin-transform-async-to-generator": "^6.22.0",
        "babel-preset-env": "^1.1.8",
        "babel-preset-react": "^6.23.0",
        "electron-prebuilt-compile": "1.4.15",
        "eslint": "^3.15.0",
        "eslint-config-airbnb": "^14.1.0",
        "eslint-plugin-import": "^2.2.0",
        "eslint-plugin-jsx-a11y": "^4.0.0",
        "eslint-plugin-react": "^6.10.0"
   }

These two last dependencies get unused in a vanilla ES6/7 project.

I think this happens just because eslint-config-airbnb shouldn't be used in "Vanilla ES6/7". Why? Because what you just saw: it includes config about React.

There are two eslint-config-whatever official npm packages available for enforcing airbnb coding style:

  1. eslint-config-airbnb. Includes everything: vanilla ES6+ React.
  2. eslint-config-airbnb-base. Includes only vanilla ES6.

So "Vanilla ES6/7" template ends having these extra packages it doesn't need and doesn't use: this only makes the download bigger. And "React" template ends not having these extra packages it needs for linting and with linting not out-the-box because the linting it need it's going to "Vanilla ES6/7" :(.

If there is a "React" template, this template should be the one having the React-related stuff.

I took a brief look to all the files here, thinking about to make a PR, but I'm a bit lost about all the importing and etc. I didn't get where are coming all the imported pieces in that time, so better leave it here to someone more close to it รฑ_รฑ.

Apart from the proper packages, I think the other only needed change is with the lint npm script (and adding .eslintcache to .gitignore):

  "lint": "eslint --cache --ext .jsx,.js src"

Would suffice. At least, I think so: for now, it lints.

Visual Studio 2015 Guide

The documentation about getting any of the TypeScript templates and a fulling running and building system in Visual Studio 2015 (or 2013 or 2017) appear a little sparse.

There's lots of documentation about VSCode, but nothing about actual Visual Studio.

Can we get some documentation about how to create a project in the popular IDE?

Thanks!

Angular2 - emitDecoratorMetadata for DI

Angular2 need setting emitDecoratorMetadata for compiler to get service injecting working.

For me adding
"emitDecoratorMetadata": true,
to .compilerc and tsconfig.json just made it working.

I can make pull request for that.

With Vue + Vue-Router, Can't use lazyload component

The project is created by electron-forge init demo --template=vue
Only vue + vue-router, I use the many method to lazyload vue component, but has error:

Error: Failed to resolve async component default: AssertionError: path must be a string
    at /Users/Silence/Desktop/electron-demo/demo/node_modules/[email protected]@vue-router/dist/vue-router.js:1708:17
    at /Users/Silence/Desktop/electron-demo/demo/node_modules/[email protected]@vue-router/dist/vue-router.js:1766:15
    at /Users/Silence/Desktop/electron-demo/demo/node_modules/[email protected]@vue-router/dist/vue-router.js:1717:11
    at /Users/Silence/Desktop/electron-demo/demo/node_modules/[email protected]@vue-router/dist/vue-router.js:1742:66
    at Array.map (native)
    at /Users/Silence/Desktop/electron-demo/demo/node_modules/[email protected]@vue-router/dist/vue-router.js:1742:38
    at Array.map (native)
    at flatMapComponents (/Users/Silence/Desktop/electron-demo/demo/node_modules/[email protected]@vue-router/dist/vue-router.js:1741:26)
    at /Users/Silence/Desktop/electron-demo/demo/node_modules/[email protected]@vue-router/dist/vue-router.js:1677:5
    at iterator (/Users/Silence/Desktop/electron-demo/demo/node_modules/[email protected]@vue-router/dist/vue-router.js:1876:7)

1. Lazy load must rely on webpack? Has the electron-forge include it?
2. I am trying many way, but there is no way to work properly. such as:

'use strict';
import Vue from 'vue/dist/vue.js';
import Router from 'vue-router/dist/vue-router.js';

Vue.use(Router);

let router = new Router({
    routes: [
        {
            path: '/',
            redirect: '/index'
        },
        {
            name: 'login',
            path: '/login',
            // component: require('./components/Login.vue') //working
            // component: resolve => System.import('./components/Login.vue') //not working
            // component: () => import('./components/Login.vue')  //not working
            component: view('Login')  //not working
        },
        {
            name: 'test',
            path: '/test/:userId',
            component: resolve => require(['./components/Test.vue'], resolve)  //not working
        },
        {
            path: '*',
            redirect: '/'
        }
    ]
});

/**
 * Asynchronously load view (Webpack Lazy loading compatible)
 * @param  {string}   name     the filename (basename) of the view to load.
 */
function view(name) {
    return function(resolve) {
        require(['./components/' + name + '.vue'], resolve);
    }
};

export default router;

Can your help me point out the mistake? Thanks! waiting...

Angular2 SyntaxError: Unexpected token import

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:
On a fresh angular2 project after npm install I get this error:

SyntaxError: Unexpected token import
    at Object.exports.runInThisContext (vm.js:78:16)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at loadApplicationPackage (/home/newProj/node_modules/electron/dist/resources/default_app.asar/main.js:283:12)
    at Object.<anonymous> (/home/newProj/node_modules/electron/dist/resources/default_app.asar/main.js:325:5)
    at Object.<anonymous> (/home/newProj/node_modules/electron/dist/resources/default_app.asar/main.js:361:3)
    at Module._compile (module.js:571:32)

Environment:

Console output when you run electron-forge START 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 start
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 +10ms
  electron-forge:runtime-config setting key: verbose to value: false +4ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Locating Application +0ms
  electron-forge:project-resolver searching for project in: /home/newProj +2ms
  electron-forge:project-resolver electron-forge compatible package.json found in /home/newProj/package.json +3ms
  electron-forge:lifecycle Process Succeeded: Locating Application +1ms
  electron-forge:lifecycle Process Started: Preparing native dependencies +0ms
  electron-forge:lifecycle Process Succeeded: Preparing native dependencies +35ms
  electron-forge:hook could not find hook: generateAssets +4ms
  electron-forge:lifecycle Process Started: Launching Application +0ms
  electron-forge:lifecycle Process Succeeded: Launching Application +3ms
App threw an error during load
/home/newProj/src/index.ts:1
(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { import { app, BrowserWindow } from 'electron';
                                                                                                                                                           ^^^^^^
SyntaxError: Unexpected token import
    at Object.exports.runInThisContext (vm.js:78:16)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at loadApplicationPackage (/home/newProj/node_modules/electron/dist/resources/default_app.asar/main.js:283:12)
    at Object.<anonymous> (/home/newProj/node_modules/electron/dist/resources/default_app.asar/main.js:325:5)
    at Object.<anonymous> (/home/newProj/node_modules/electron/dist/resources/default_app.asar/main.js:361:3)
    at Module._compile (module.js:571:32)
A JavaScript error occurred in the main process
Uncaught Exception:
/home/newProj/src/index.ts:1
(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { import { app, BrowserWindow } from 'electron';
                                                                                                                                                           ^^^^^^
SyntaxError: Unexpected token import
    at Object.exports.runInThisContext (vm.js:78:16)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at loadApplicationPackage (/home/newProj/node_modules/electron/dist/resources/default_app.asar/main.js:283:12)
    at Object.<anonymous> (/home/newProj/node_modules/electron/dist/resources/default_app.asar/main.js:325:5)
    at Object.<anonymous> (/home/newProj/node_modules/electron/dist/resources/default_app.asar/main.js:361:3)
    at Module._compile (module.js:571:32)

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem.

electron-forge init newProj --template=angular2
cd newProj
electron-forge start (ok)
npm install
electron-forge start (error)

npm install output:

$ npm install
npm WARN deprecated @types/[email protected]: This is a stub types definition for electron (https://github.com/electron/electron). electron provides its own type definitions, so you don't need @types/electron installed!
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: Deprecated, use jstransformer
npm WARN gentlyRm not removing /home/newProj/node_modules/tslint/node_modules/.bin/tsc as it wasn't installed by /home/newProj/node_modules/tslint/node_modules/typescript
npm WARN gentlyRm not removing /home/newProj/node_modules/tslint/node_modules/.bin/tsserver as it wasn't installed by /home/newProj/node_modules/tslint/node_modules/typescript
npm WARN gentlyRm not removing /home/newProj/node_modules/electron-compilers/node_modules/.bin/tsc as it wasn't installed by /home/newProj/node_modules/electron-compilers/node_modules/typescript
npm WARN gentlyRm not removing /home/newProj/node_modules/electron-compilers/node_modules/.bin/tsserver as it wasn't installed by /home/newProj/node_modules/electron-compilers/node_modules/typescript
npm WARN gentlyRm not removing /home/newProj/node_modules/.bin/uglifyjs as it wasn't installed by /home/newProj/node_modules/uglify-js
npm WARN gentlyRm not removing /home/newProj/node_modules/.bin/mkdirp as it wasn't installed by /home/newProj/node_modules/mkdirp
npm WARN gentlyRm not removing /home/newProj/node_modules/.bin/browserslist as it wasn't installed by /home/newProj/node_modules/browserslist

> [email protected] postinstall /home/newProj/node_modules/electron
> node install.js

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No repository field.

added 36 packages, removed 26 packages and updated 579 packages in 20.022s

Angular 2 Template not working

Running the command
electron-forge init <project name> --template=angular2
And, this runs successfully, but when I run
electron-forge start
In the newly created project, I get an error from the bootstrap.ts:

Uncaught ReferenceError: exports is not defined

Archiving Repository

๐Ÿ‘‹ Electron Forge maintainer here. As it's pretty obvious from the lack of issue/pull request triage, the maintainership burden for adding/updating framework templates is a bit too high for the current maintainers for Electron Forge. So starting with Electron Forge v6, we've decided to go the following route:

  • Remove built-in framework-specific templates from Forge
  • Add a built-in template for use with Webpack
  • Archive this repository

We may in the future add templates for other bundlers such as Parcel.

We still have third-party template support, so you can create your own template in the framework of your choice and use it with electron-forge init --template=$PACKAGE_OR_FOLDER_NAME.

TypeScript errors not displayed

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

When I create a new project with:

electron-forge init my-new-project --template=react-typescript

It initially has a type error, because it requires electron-compile which doesn't yet have typings.

But when the project is run with electron-forge start the type errors don't get displayed anywhere. It just silently runs. Ideally the console should display type errors prominently.

Also the initially created project should not error - I've submitted a PR for embedded typings in electron-compile to try to resolve this.

Cannot find module 'vueify/lib/insert-css'

This error will come up in the VueJs template, simple fix/workaround for me was to add Vueify as a dependency to the project via yarn/npm. Perhaps it would be worth including it in the templates package.json

React HMR doesn't work consistently

When changes are made to a file and saved, HMR works the first time but if further changes are made to the same file, there is not HMR to reflect the newer changes but HMR works if a different file is changed.

Any ideas about how to fix this? I am using the js react template

VSCode Debug: Template - React & Typescript

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

Referencing: https://github.com/electron-userland/electron-forge#debugging-your-application-through-vs-code

The initial spin-up prior to any modifications does not include (in the ../bin directory):

  • electron-forge-vscode-nix
  • electron-forge-vscode-win.cmd

so attaching and debugging fails following the reference.

Console output when you run electron-forge init with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

Put the console output here

What command line arguments are you passing?

Put the arguments here

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

Paste the config.forge JSON object here

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem.

Update dependencies of React package & Improve Docs

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Update the dependencies of React package its so old. Also, the docs aren't proper.

After I tried electron-forge init . --template=react, it gave me an error saying Install npm I -g @electron-forge-template-react & when I tried it, it gave me an error saying it does not exist.

So it should've been npm i -g electron-forge-template-react without the @

I think you should set up GreenKeeper bot to auto-update packages without requiring more manual work. Also, electron version is old. Now I know you might not wanna use Beta v3 but again it would be better if it can be users decision. Personally, electron-forge aims to be simpler & it really is but I think packages need to be updated otherwise its more manual work than setting up electron-webpack

[React] Component import CSS

Hi,

I have one component (react-calendar-timeline) which importing css directly Timeline.scss.
When I run my app I have an error that I don't know how to solve it :

On /Users/romain/Programmation/Humanitech/Lacle/lacle-front/node_modules/react-calendar-timeline/modules/lib/Timeline.css
Uncaught SyntaxError: Unexpected token .
    at Object.exports.runInThisContext (vm.js:78:16)
    at Module._compile (module.js:543:28)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/romain/Programmation/Humanitech/Lacle/lacle-front/node_modules/electron-compile/lib/require-hook.js:75:14)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/romain/Programmation/Humanitech/Lacle/lacle-front/node_modules/react-calendar-timeline/modules/lib/Timeline.js:19:1)
    at Object.<anonymous> (/Users/romain/Programmation/Humanitech/Lacle/lacle-front/node_modules/react-calendar-timeline/modules/lib/Timeline.js:1074:3)

Should I add a configuration in .compilerc? If yes which one ?

Thx
Hope to get help from you

remote examples?

Should the templates include electron-remote w/ a simple example of it's use?

Or is that overkill?

`babel-preset-react` included with project initiated via `vue` template

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

You'll eventually find it not appropriate to have babel-preset-react module when initializing a project via vue template.

Please provide either a failing minimal testcase or detailed steps to
reproduce your problem.

electron-forge init project-name --template=vue
cd project-name
nano package.json

Angular 2 - tslint config

I see that here both react-typscript and angular2 share the same lint config. As I don't use react I can't say anything about it, but for Angular2 it would be great to use tslint from angular skeleton app (with support of codelyzer)

Initial Start for react-typescript fails

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

Initial Start of the react-typescript template fails.

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in.
Uncaught TypeError: Cannot read property 'unmountComponent' of null
    at ReactCompositeComponentWrapper.performInitialMountWithErrorHandling (<path>/my-new-project/node_modules/react-dom/lib/ReactCompositeComponent.js:327:30)
    at ReactCompositeComponentWrapper.mountComponent (<path>/my-new-project/node_modules/react-dom/lib/ReactCompositeComponent.js:256:21)
    at Object.mountComponent (<path>/node_modules/react-dom/lib/ReactReconciler.js:46:35)
    at ReactCompositeComponentWrapper.performInitialMount (<path>/my-new-project/node_modules/react-dom/lib/ReactCompositeComponent.js:371:34)
    at ReactCompositeComponentWrapper.mountComponent (<path>/my-new-project/node_modules/react-dom/lib/ReactCompositeComponent.js:258:21)
    at Object.mountComponent (<path>/my-new-project/node_modules/react-dom/lib/ReactReconciler.js:46:35)
    at mountComponentIntoNode (<path>/my-new-project/node_modules/react-dom/lib/ReactMount.js:104:32)
    at ReactReconcileTransaction.perform (<path>/my-new-project/node_modules/react-dom/lib/Transaction.js:140:20)
    at batchedMountComponentIntoNode (<path>/my-new-project/node_modules/react-dom/lib/ReactMount.js:126:15)
    at ReactDefaultBatchingStrategyTransaction.perform (<path>/my-new-project/node_modules/react-dom/lib/Transaction.js:140:20)

Console output when you run electron-forge init with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

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 +20ms
  electron-forge:runtime-config setting key: verbose to value: false +9ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Locating Application +0ms
  electron-forge:project-resolver searching for project in: <path>/my-new-project +2ms
  electron-forge:project-resolver electron-forge compatible package.json found in <path>/my-new-project/package.json +7ms
  electron-forge:lifecycle Process Succeeded: Locating Application +1ms
  electron-forge:lifecycle Process Started: Preparing native dependencies +1ms
  electron-forge:lifecycle Process Succeeded: Preparing native dependencies +98ms
  electron-forge:lifecycle Process Started: Launching Application +1ms
  electron-forge:lifecycle Process Succeeded: Launching Application +4ms
2017-03-09 12:07:37.519 Electron Helper[46671:1123231] Couldn't set selectedTextBackgroundColor from default ()

What command line arguments are you passing?

DEBUG=electron-forge:* electron-forge start

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

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

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem.

npm install -g electron-forge

electron-forge init my-new-project --template=react-typescript

cd my-new-project

electron-forge start

React Template - UnhandledPromiseRejectionWarning: Error: spawn unzip ENOENT

version 5.2.4 of electron-forge

I don't think I need to say too much about this as below info should be enough? Fresh React template is raising this error on start, I have another one after installing a few node modules(from a different electron react project that works fine that did not use forge), that raises a different error.

I've compared it to initializing a project without the React template specified, there are some differences (mainly the React project pulls in an extra babel plugin for es2015 classes, and .compilerc specifies electron 1.6 vs no templates 4.0). Perhaps the template is just out of date?

Any other info you'd like?

Console output when you run electron-forge init with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

[me@linux projects]$ electron-forge init myproject --template=react
โœ” Checking your system
โœ” Initializing Project Directory
โœ” Initializing Git Repository
โœ” Copying Starter Files
โœ” Initializing NPM Module
โœ” Installing NPM Dependencies
โœ” Locating custom template: "react"
โœ” Installing Template Dependencies
โœ” Copying Template Files
[me@linux projects]$ electron-forge start
โœ” Checking your system
(node:20663) UnhandledPromiseRejectionWarning: Error: spawn unzip ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
    at onErrorNT (internal/child_process.js:407:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:20663) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:20663) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
DEBUG=electron-forge:* electron-forge start
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 +369ms
  electron-forge:runtime-config setting key: verbose to value: false +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Locating Application +0ms
  electron-forge:project-resolver searching for project in: /storage/projects/forge/myproject +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in /storage/projects/forge/myproject/package.json +5ms
  electron-forge:lifecycle Process Succeeded: Locating Application +7ms
  electron-forge:lifecycle Process Started: Preparing native dependencies +4ms
  electron-forge:lifecycle Process Succeeded: Preparing native dependencies +216ms
  electron-forge:hook could not find hook: generateAssets +0ms
  electron-forge:lifecycle Process Started: Launching Application +1ms
  electron-forge:lifecycle Process Succeeded: Launching Application +3ms
(node:21092) UnhandledPromiseRejectionWarning: Error: spawn unzip ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
    at onErrorNT (internal/child_process.js:407:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:21092) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:21092) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

What command line arguments are you passing?

Followed [official site template instructions(]https://electronforge.io/templates) for React

npm install -g electron-forge
electron-forge init myproject --template=react
cd my-new-project
electron-forge start

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

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

Serious security issues

running an nsp check before starting my project give me this report:

security report

more information about nsp

How to fix this?
Can i just upgrade the packages mentioned by nsp ?

Angular2 template is not working with component-relative paths

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

I have created an application using Angular2 template and organized my components in folders using component-relative paths such as:

image

When I start the application I get the following error from the compiler:

"Template parse errors:
'anonymous' is not a known element:
1. If 'anonymous' is an Angular component, then verify that it is part of this module.
2. If 'anonymous' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message. (":\test-project\node_modules\electron-compile\lib\file-change-cache.js:127:41
    at Generator.next ([ERROR ->]<anonymous>)
    at step (D:\test-project\node_modules\electron-compile\lib\file-change-cache.js:27:1"): DemoComponent@10:23"

Console output when you run electron-forge init with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

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 +51ms
  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:init Initializing in: D:\test-project +0ms
  electron-forge:lifecycle Process Started: Initializing Project Directory +3ms
  electron-forge:init:directory creating directory: D:\test-project +2ms
  electron-forge:lifecycle Process Succeeded: Initializing Project Directory +5ms
  electron-forge:lifecycle Process Started: Initializing Git Repository +1ms
  electron-forge:init:git executing "git init" in directory: D:\test-project +1ms
  electron-forge:lifecycle Process Succeeded: Initializing Git Repository +89ms
  electron-forge:lifecycle Process Started: Copying Starter Files +1ms
  electron-forge:init:starter-files creating directory: D:\test-project\src +1ms
  electron-forge:init:starter-files copying "C:\Users\abampakos\AppData\Roaming\npm\node_modules\electron-forge\tmpl\_gitignore" --> "D:\test-project\.gitignore" +1ms
  electron-forge:init:starter-files copying "C:\Users\abampakos\AppData\Roaming\npm\node_modules\electron-forge\tmpl\_compilerc" --> "D:\test-project\.compilerc" +3ms
  electron-forge:init:starter-files copying "C:\Users\abampakos\AppData\Roaming\npm\node_modules\electron-forge\tmpl\index.js" --> "D:\test-project\src\index.js" +2ms
  electron-forge:init:starter-files copying "C:\Users\abampakos\AppData\Roaming\npm\node_modules\electron-forge\tmpl\index.html" --> "D:\test-project\src\index.html" +1ms
  electron-forge:lifecycle Process Succeeded: Copying Starter Files +1ms
  electron-forge:lifecycle Process Started: Initializing NPM Module +1ms
  electron-forge:init:npm writing package.json to: D:\test-project +5ms
  electron-forge:lifecycle Process Succeeded: Initializing NPM Module +4ms
  electron-forge:lifecycle Process Started: Installing NPM Dependencies +1ms
  electron-forge:init:npm installing dependencies +2ms
  electron-forge:dependency-installer installing ["electron-compile"] in: D:\test-project dev=false,exact=false,withYarn=false +17ms
  electron-forge:dependency-installer executing ["install","electron-compile","--save"] in: D:\test-project +1ms
  electron-forge:runtime-config fetching key verbose +1ms
  electron-forge:runtime-config fetching key verbose +7ms
  electron-forge:init:npm installing devDependencies +15s
  electron-forge:dependency-installer installing ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator"] in: D:\test-project dev=true,exact=false,withYarn=false +0ms
  electron-forge:dependency-installer executing ["install","babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","--save-dev"] in: D:\test-project +1ms
  electron-forge:runtime-config fetching key verbose +1ms
  electron-forge:runtime-config fetching key verbose +7ms
  electron-forge:init:npm installing exact dependencies +14s
  electron-forge:dependency-installer installing ["electron-prebuilt-compile"] in: D:\test-project dev=true,exact=true,withYarn=false +1ms
  electron-forge:dependency-installer executing ["install","electron-prebuilt-compile","--save-exact","--save-dev"] in: D:\test-project +1ms
  electron-forge:runtime-config fetching key verbose +1ms
  electron-forge:runtime-config fetching key verbose +8ms
  electron-forge:init:npm not installing linting deps +37s
  electron-forge:lifecycle Process Succeeded: Installing NPM Dependencies +6ms
  electron-forge:lifecycle Process Started: Locating custom template: "angular2" +2ms
  electron-forge:init:custom using local template +3ms
  electron-forge:lifecycle Process Succeeded: Locating custom template: "angular2" +2ms
  electron-forge:lifecycle Process Started: Installing Template Dependencies +1ms
  electron-forge:init:custom installing dependencies +1ms
  electron-forge:dependency-installer installing ["@angular/common@^2.4.1","@angular/compiler@^2.4.1","@angular/core@^2.4.1","@angular/platform-browser@^2.4.1","@angular/platform-browser-dynamic@^2.4.1","@types/electron@^1.4.30","electron-devtools-installer@^2.0.1","reflect-metadata@^0.1.9","tslib@^1.4.0","zone.js@^0.7.4"] in: D:\test-project dev=false,exact=false,withYarn=false +0ms
  electron-forge:dependency-installer executing ["install","@angular/common@^2.4.1","@angular/compiler@^2.4.1","@angular/core@^2.4.1","@angular/platform-browser@^2.4.1","@angular/platform-browser-dynamic@^2.4.1","@types/electron@^1.4.30","electron-devtools-installer@^2.0.1","reflect-metadata@^0.1.9","tslib@^1.4.0","zone.js@^0.7.4","--save"] in: D:\test-project +1ms
  electron-forge:runtime-config fetching key verbose +1ms
  electron-forge:runtime-config fetching key verbose +7ms
  electron-forge:init:custom installing devDependencies +9s
  electron-forge:dependency-installer installing ["tslint@^4.2.0","typescript@~2.1.4"] in: D:\test-project dev=true,exact=false,withYarn=false +1ms
  electron-forge:dependency-installer executing ["install","tslint@^4.2.0","typescript@~2.1.4","--save-dev"] in: D:\test-project +1ms
  electron-forge:runtime-config fetching key verbose +1ms
  electron-forge:runtime-config fetching key verbose +6ms
  electron-forge:lifecycle Process Succeeded: Installing Template Dependencies +10s
  electron-forge:lifecycle Process Started: Copying Template Files +1ms
  electron-forge:init:starter-files copying "C:/Users/abampakos/AppData/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-angular2/tmpl/_compilerc" --> "D:\test-project\.compilerc" +7ms
  electron-forge:init:starter-files copying "C:/Users/abampakos/AppData/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-angular2/tmpl/src/app.component.ts" --> "D:\test-project\src\app.component.ts" +3ms
  electron-forge:init:starter-files copying "C:/Users/abampakos/AppData/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-angular2/tmpl/src/bootstrap.ts" --> "D:\test-project\src\bootstrap.ts" +2ms
  electron-forge:init:starter-files copying "C:/Users/abampakos/AppData/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-angular2/tmpl/src/index.html" --> "D:\test-project\src\index.html" +1ms
  electron-forge:init:starter-files copying "C:/Users/abampakos/AppData/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-angular2/tmpl/src/index.ts" --> "D:\test-project\src\index.ts" +1ms
  electron-forge:init:starter-files copying "C:/Users/abampakos/AppData/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-angular2/tmpl/tsconfig.json" --> "D:\test-project\tsconfig.json" +1ms
  electron-forge:init:starter-files copying "C:/Users/abampakos/AppData/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-angular2/tmpl/tslint.json" --> "D:\test-project\tslint.json" +2ms
  electron-forge:lifecycle Process Succeeded: Copying Template Files +1ms

What command line arguments are you passing?

start

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

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

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem.

https://drive.google.com/file/d/0B9H4CfCJzrtGVW85UWNfM3duVzQ/view?usp=sharing

Angular2 Template app doesn't start

I created an app using the angular2 template, made no further changes and it would not run correctly.
The console shows this error:
Uncaught ReferenceError: exports is not defined
at bootstrap.ts:2

I created a vanilla es6 app and that worked fine.

Angular app-routing causes electron-compile to fail : "Can't stat"

  • [x ] I have read the contribution documentation for this project.
  • [ x] I agree to follow the code of conduct that this project follows, as appropriate.
  • [x ] I have searched the issue tracker for an issue that matches the one I want to file, without success.

I created an electron forge project with template angular 2
i then added an app router to my app-module with an empty path matcher. this causes a fail to compile stat problem where stat is based on a directory not a file.

import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

export const routes: Routes = [
  { path: '', redirectTo: '/music', pathMatch: 'full'}
  //{ path: 'lazy', loadChildren: 'app/lazy/lazy.module#LazyModule' }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule {}
Put the console output here

Failed to compile .../src/music: Can't stat ../src/music
Error: Can't stat .../src/music
at .../node_modules/electron-compile/lib/file-change-cache.js:183:42
at Generator.next ()
at step (.../node_modules/electron-compile/lib/file-change-cache.js:27:191)
at .../node_modules/electron-compile/lib/file-change-cache.js:27:361

What command line arguments are you passing?

none

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

unchanged from default

this I suspect will be the experience of others who want to use electron, angular and basic routing

Typescript Paths

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:
Current typescript doesn't support paths options. Is there any special config to use it?
I've use the angular template to generate the project.

image

TsConfig:

image

Console output when you run electron-forge init with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

Put the console output here

image

What command line arguments are you passing?

Put the arguments here

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

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

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem.

Cannot find namespace 'Electron' on new project

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:
Running lint on newly created typescript+react template gives warnings:

Error at src/index.ts:1:36: Cannot find module 'electron'.
Error at src/index.ts:7:17: Cannot find namespace 'Electron'.

Console output when you run electron-forge init with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

electron-forge init my-new-project --template=react-typescript
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 +214ms
  electron-forge:runtime-config setting key: verbose to value: false +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:init Initializing in: /Users/user/Projects/my-new-project +0ms
  electron-forge:lifecycle Process Started: Initializing Project Directory +0ms
  electron-forge:init:directory creating directory: /Users/user/Projects/my-new-project +0ms
  electron-forge:lifecycle Process Succeeded: Initializing Project Directory +3ms
  electron-forge:lifecycle Process Started: Initializing Git Repository +1ms
  electron-forge:init:git executing "git init" in directory: /Users/user/Projects/my-new-project +0ms
  electron-forge:lifecycle Process Succeeded: Initializing Git Repository +18ms
  electron-forge:lifecycle Process Started: Copying Starter Files +1ms
  electron-forge:init:starter-files creating directory: /Users/user/Projects/my-new-project/src +0ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/_gitignore" --> "/Users/user/Projects/my-new-project/.gitignore" +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/_compilerc" --> "/Users/user/Projects/my-new-project/.compilerc" +5ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/index.js" --> "/Users/user/Projects/my-new-project/src/index.js" +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/index.html" --> "/Users/user/Projects/my-new-project/src/index.html" +1ms
  electron-forge:lifecycle Process Succeeded: Copying Starter Files +9ms
  electron-forge:lifecycle Process Started: Initializing NPM Module +0ms
  electron-forge:init:npm writing package.json to: /Users/user/Projects/my-new-project +0ms
  electron-forge:lifecycle Process Succeeded: Initializing NPM Module +6ms
  electron-forge:lifecycle Process Started: Installing NPM Dependencies +1ms
  electron-forge:init:npm installing dependencies +2ms
  electron-forge:dependency-installer installing ["electron-compile","electron-squirrel-startup"] in: /Users/user/Projects/my-new-project dev=false,exact=false,withYarn=false +0ms
  electron-forge:dependency-installer executing ["install","electron-compile","electron-squirrel-startup","--save"] in: /Users/user/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +0ms
  electron-forge:init:npm installing devDependencies +6s
  electron-forge:dependency-installer installing ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge"] in: /Users/user/Projects/my-new-project dev=true,exact=false,withYarn=false +6s
  electron-forge:dependency-installer executing ["install","babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge","--save-dev"] in: /Users/user/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +6s
  electron-forge:init:npm installing exact dependencies +30s
  electron-forge:dependency-installer installing ["electron-prebuilt-compile"] in: /Users/user/Projects/my-new-project dev=true,exact=true,withYarn=false +30s
  electron-forge:dependency-installer executing ["install","electron-prebuilt-compile","--save-exact","--save-dev"] in: /Users/user/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +30s
  electron-forge:init:npm not installing linting deps +16s
  electron-forge:lifecycle Process Succeeded: Installing NPM Dependencies +52s
  electron-forge:lifecycle Process Started: Locating custom template: "react-typescript" +2ms
  electron-forge:init:custom using local template +0ms
  electron-forge:lifecycle Process Succeeded: Locating custom template: "react-typescript" +3ms
  electron-forge:lifecycle Process Started: Installing Template Dependencies +1ms
  electron-forge:init:custom installing dependencies +1ms
  electron-forge:dependency-installer installing ["react@^15.4.1","react-dom@^15.4.1","@types/react@^0.14.55","@types/react-dom@^0.14.20","@types/electron-devtools-installer@^2.0.2","electron-devtools-installer@^2.1.0","react-hot-loader@^3.0.0-beta.6","tslib@^1.4.0"] in: /Users/user/Projects/my-new-project dev=false,exact=false,withYarn=false +16s
  electron-forge:dependency-installer executing ["install","react@^15.4.1","react-dom@^15.4.1","@types/react@^0.14.55","@types/react-dom@^0.14.20","@types/electron-devtools-installer@^2.0.2","electron-devtools-installer@^2.1.0","react-hot-loader@^3.0.0-beta.6","tslib@^1.4.0","--save"] in: /Users/user/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +16s
  electron-forge:init:custom installing devDependencies +8s
  electron-forge:dependency-installer installing ["tslint@^5.1.0","typescript@~2.2.2"] in: /Users/user/Projects/my-new-project dev=true,exact=false,withYarn=false +8s
  electron-forge:dependency-installer executing ["install","tslint@^5.1.0","typescript@~2.2.2","--save-dev"] in: /Users/user/Projects/my-new-project +0ms
  electron-forge:runtime-config fetching key verbose +8s
  electron-forge:lifecycle Process Succeeded: Installing Template Dependencies +14s
  electron-forge:lifecycle Process Started: Copying Template Files +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/_compilerc" --> "/Users/user/Projects/my-new-project/.compilerc" +1m
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/src/app.tsx" --> "/Users/user/Projects/my-new-project/src/app.tsx" +2ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/src/index.html" --> "/Users/user/Projects/my-new-project/src/index.html" +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/src/index.ts" --> "/Users/user/Projects/my-new-project/src/index.ts" +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/tsconfig.json" --> "/Users/user/Projects/my-new-project/tsconfig.json" +1ms
  electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/tslint.json" --> "/Users/user/Projects/my-new-project/tslint.json" +1ms
  electron-forge:lifecycle Process Succeeded: Copying Template Files +21ms

What command line arguments are you passing?

electron-forge init my-new-project --template=react-typescript

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

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

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem.

Steps to reproduce:
1 . electron-forge init my-new-project --template=react-typescript
3. cd my-new-project
4. npm run lint

Installing electron package fixes this, but app works fine w/o.
Just gives lint errors.

Add Ember template

The README mentions as a supported framework so it would be good to get a super basic example in here

Vue-awesome not integrating with electron-forge [ Modules with ES6 imports ]

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:
I am just trying to use vue-awesome in my app and i tried all workarounds that i can think of but still can't find a solution to integrate it with electron-forge.

The error:

Uncaught SyntaxError: Unexpected token import
    at Object.exports.runInThisContext (vm.js:78:16)
    at Module._compile (module.js:543:28)
    at Object.require.extensions.(anonymous function) [as .js] (D:\Work\NEM\paper-wallet\node_modules\electron-compile\lib\require-hook.js:77:14)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at file:///D:/Work/NEM/paper-wallet/src/js/main.js:31:1

My code

import 'vue-awesome/icons';
import Icon from './components/Icon.vue';




Vue.use(VueRouter);
Vue.use(ElementUI);
Vue.component('icon', Icon);

notice here that i am importing the Icon.vue component from my local folder simply because this line import Icon from 'vue-awesome/components/Icon don't work for me.

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": "paper_wallet"
      },
      "electronInstallerDebian": {},
      "electronInstallerRedhat": {},
      "github_repository": {
        "owner": "",
        "name": ""
      },
      "windowsStoreConfig": {
        "packageName": "",
        "name": "paperwallet"
      }
    }
  },

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem.

For a test case just try using vue-awesome in your project and let me know if it works

Uncaught ReferenceError: exports is not defined

There is the above error using latest package of electron-forge and angular2 electron-forge-templates.

If I just execute following commands:
electron-forge init my-prj --template=angular2
electron-forge start

I get "Uncaught ReferenceError: exports is not defined"

A workaround is to explicitly declare exports in html:

<script>
if(!window.exports) { exports = module.exports; }
</script>

just before bootstrap.ts.

I've found this issue in electron (electron/electron#2863) so I don't know if this issue should be addressed by template or angular-forge.

Unexpected Token <

Hi,

On macOSX 10.12.1 I was running the react-typescript template and getting the error:

Uncaught SyntaxError: Unexpected token < index.html:inline_1.tsx:12

After trying a few different things removing the space on the body tag after the style attribute fixed the issue..

so <body style="overflow: hidden; background-color: rgba(0,0,0,0); margin: 0" >

to <body style="overflow: hidden; background-color: rgba(0,0,0,0); margin: 0">

Thought I'd post incase anyone else comes across this issue.

Thanks

Unexpected token: React - Arrow Functions

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Hello,
i've Created a new Project with electron forge and the react template.

Now I want to use arrow functions, but that won't work.

What can i do?

Error Message

Uncaught SyntaxError: C:/Users/Test/test/src/app.jsx: Unexpected token (4:20)
    at Parser.pp$5.raise (C:\Users\Test\test\node_modules\babylon\lib\index.js:4454:13)
    at Parser.pp.unexpected (C:\Users\Test\test\node_modules\babylon\lib\index.js:1761:8)
    at Parser.pp$1.parseClassProperty (C:\Users\Test\test\node_modules\babylon\lib\index.js:2571:50)
    at Parser.parseClassProperty (C:\Users\Test\test\node_modules\babylon\lib\index.js:6157:20)
    at Parser.pp$1.parseClassBody (C:\Users\Test\test\node_modules\babylon\lib\index.js:2516:34)
    at Parser.pp$1.parseClass (C:\Users\Test\test\node_modules\babylon\lib\index.js:2406:8)
    at Parser.pp$1.parseExport (C:\Users\Test\test\node_modules\babylon\lib\index.js:2642:19)
    at Parser.parseExport (C:\Users\Test\test\node_modules\babylon\lib\index.js:6000:20)
    at Parser.pp$1.parseStatement (C:\Users\Test\test\node_modules\babylon\lib\index.js:1884:74)
    at Parser.parseStatement (C:\Users\Test\test\node_modules\babylon\lib\index.js:5910:22)

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

{
  "name": "test",
  "productName": "test",
  "version": "1.0.0",
  "description": "My Electron application description",
  "main": "src/index.js",
  "scripts": {
    "start": "electron-forge start",
    "package": "electron-forge package",
    "make": "electron-forge make",
    "publish": "electron-forge publish",
    "lint": "eslint --cache --color --ext .jsx,.js src"
  },
  "keywords": [],
  "author": "---",
  "license": "MIT",
  "config": {
    "forge": {
      "make_targets": {
        "win32": [
          "squirrel"
        ],
        "darwin": [
          "zip"
        ],
        "linux": [
          "deb",
          "rpm"
        ]
      },
      "electronPackagerConfig": {
        "packageManager": "npm"
      },
      "electronWinstallerConfig": {
        "name": "test"
      },
      "electronInstallerDebian": {},
      "electronInstallerRedhat": {},
      "github_repository": {
        "owner": "",
        "name": ""
      },
      "windowsStoreConfig": {
        "packageName": "",
        "name": "test"
      }
    }
  },
  "dependencies": {
    "electron-compile": "^6.4.3",
    "electron-devtools-installer": "^2.2.4",
    "electron-squirrel-startup": "^1.0.0",
    "react": "^15.6.2",
    "react-dom": "^15.6.2",
    "react-hot-loader": "^3.1.3"
  },
  "devDependencies": {
    "babel-plugin-transform-async-to-generator": "^6.24.1",
    "babel-plugin-transform-es2015-classes": "^6.24.1",
    "babel-preset-env": "^1.7.0",
    "babel-preset-react": "^6.24.1",
    "electron-forge": "^5.2.2",
    "electron-prebuilt-compile": "3.0.0",
    "eslint": "^3.19.0",
    "eslint-config-airbnb": "^15.1.0",
    "eslint-plugin-import": "^2.14.0",
    "eslint-plugin-jsx-a11y": "^5.1.1",
    "eslint-plugin-react": "^7.11.1"
  }
}

app.jsx:

import React from 'react';

export default class App extends React.Component {
  componentDidMount = () => {
    console.log("test");
  }

  render() {
    return (<div>
      <h2>Welcome to React!</h2>
    </div>);
  }
}

`lint` task does not appear to work for the TypeScript templated projects

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

It doesn't appear the lint task work in the generated projects. For example, right away there's an issue with the curly rule warning not popping up for src/index.ts.

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem.

Run this:

electron-forge init foobar-project --template=react-typescript

Now open foobar-project/src/index.ts in something that's tslint aware like VS Code. You'll immediate see there's a linting error on about line 11, where there's no curly braces for the live reload check. That is, by the way, a separate issue.

Now run yarn lint or anything that runs the lint task. No lint warnings appears. If you go into either of the tsx or ts files and start putting stuff in them clearly out of style, the lint task will give no warnings. In fact, you can replace index.ts with the US constitution or anything that's not valid code and it won't be read either.

I think the issue is that the lint task resolves to tslint src and that does not appear to recursively lint .ts or .tsx files undernearth src. Running something explicit like yarn lint -- src/index.ts does get the linter to respond to the file on disk.

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.