forge: babel-preset-env 1.3.0 throws "Target version must be a number" when `forge start` is run

  • [ 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.

Please describe your issue: I just created a new app per the instructions on the read me. I set the template to be react and it all installed I then did an npm install to get the remaining dependencies and from my command window ran: npm start. And this is the error I received below. FYI I am running on Windows10 and node is v6.10.0

Here is the output WITHOUT the debug variable

> myforgewithreact@0.0.1 start C:\Users\laurie\Documents\GitHub\UITests\myforgewithreact
> electron-forge start

√ Checking your system
√ Locating Application
√ Preparing native dependencies
√ Launching Application

App threw an error during load
Error: Target version must be a number,
          '1.6.0' was given for 'electron' (While processing preset: "C:\\Users\\laurie\\Documents\\GitHub\\UITests\\myforgewithreact\\node_modules\\babel-preset-env\\lib\\index.js")
    at C:\Users\laurie\Documents\GitHub\UITests\myforgewithreact\node_modules\babel-preset-env\lib\index.js:64:13
    at Array.filter (native)
    at isPluginRequired (C:\Users\laurie\Documents\GitHub\UITests\myforgewithreact\node_modules\babel-preset-env\lib\index.js:54:54)
    at filterItem (C:\Users\laurie\Documents\GitHub\UITests\myforgewithreact\node_modules\babel-preset-env\lib\index.js:166:20)
    at Array.filter (native)
    at buildPreset (C:\Users\laurie\Documents\GitHub\UITests\myforgewithreact\node_modules\babel-preset-env\lib\index.js:215:56)
    at C:\Users\laurie\Documents\GitHub\UITests\myforgewithreact\node_modules\babel-core\lib\transformation\file\options\option-manager.js:317:46
    at Array.map (native)
    at OptionManager.resolvePresets (C:\Users\laurie\Documents\GitHub\UITests\myforgewithreact\node_modules\babel-core\lib\transformation\file\options\option-manager.js:275:20)
    at OptionManager.mergePresets (C:\Users\laurie\Documents\GitHub\UITests\myforgewithreact\node_modules\babel-core\lib\transformation\file\options\option-manager.js:264:10)

What command line arguments are you passing? NONE

What does your config.forge data in package.json look like? (did not change it)

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

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

New projects in Forge no longer have this problem as of 2.9.0. It uses a Number for the Electron version instead of a String.