Electron-forge: not able to init a project

Created on 13 Dec 2016  路  15Comments  路  Source: electron-userland/electron-forge

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

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

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

What command line arguments are you passing?

electron-forge init forgetest

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

does not exist

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem. Using electron-forge init is a good starting point, if that is not the
source of your problem.

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

Most helpful comment

@malept 5 is only get sec patches now I think, would make sense to just stick to LTS versions that we can support 馃憤 People should be moving to 6 anyway 馃槅

All 15 comments

What version of Node are you using? I suspect that it's not Node 6, which happens to be the only version that we test against at the moment.

right now im using node version v5.10.1

Yup, Array.prototype.includes was introduced in Node 6 (not behind a --harmony flag, anyway).

ok I will update to a newer version - thanks for your quick response!

I'm going to add some stuff to the documentation that makes it more explicit about which Node versions we support.

17 has been merged, it will be in the next release. Thanks for notifying us of this issue.

@malept I'm slightly concerned that babel didn't transform .includes

https://github.com/electron-userland/electron-forge/blob/master/package.json#L42

Might have to look into that at some point

@MarshallOfSound are we going to support Node >= 4? (I'm OK with it, but you're the one who put only 6 in CI 馃槂 )

An argument for it would be that the other Electron tooling at this level also supports these versions of Node.

@malept I think we could / should until 4 is no longer LTS. If we add that includes plugin or just refactor includes out of everything then I think it would work on 4.x

@MarshallOfSound

I think we could / should until 4 is no longer LTS

Woo, April Fools' Day 2018!

I'll file a PR to revert back to Node 4 plus add the babel plugin and test against Node 4 (that's going to be fun) later tonight, unless you get to it first.

@malept If the node.js team doesn't do something with that opportunity 馃槅

Could play a prank on a global scale 馃槅

@malept Looks like we can't support node 4.x as electron-compile doesn't.

https://github.com/electron/electron-compile/blob/master/package.json#L31

@MarshallOfSound Well, that's interesting and unfortunate. Do you want to make 5 the minimum or stick with 6?

@malept 5 is only get sec patches now I think, would make sense to just stick to LTS versions that we can support 馃憤 People should be moving to 6 anyway 馃槅

Was this page helpful?
0 / 5 - 0 ratings