question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue
  • [ 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"
      }
    }
  }

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
maleptcommented, Apr 3, 2017

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.

0reactions
philclevelandcommented, Apr 4, 2017

Nope recompile does not matter. I was just curious. @gimyboya 's solution did work for me. It will only work with major/minor e.g. 1.6 and not 1.6.2. The latter causes a parse error in the json. Not exactly sure why, but it is not affecting me. Thanks for the help. I am up and running again. 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

babel-preset-env 1.3.0 throws "Target version must be a ...
babel-preset-env 1.3.0 throws "Target version must be a number" when forge start is run #186. biomade opened this issue on Apr 1, 2017 ......
Read more >
@parcel/babel-preset-env | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Babel issue running npm run dev after upgrade to Mix
I have an old Laravel App which I updated to Laravel 5.8. I removed all old resources files, package-lock.json, yarn.lock and gulp files....
Read more >
The Incredibles : Kids' Blankets & Throws - Target
Contactless options including Same Day Delivery and Drive Up are available with Target. Shop today to find Kids' Blankets & Throws at incredible...
Read more >
Open Source Used In DNAC Platform Guardian - Cisco
This document contains licenses and notices for open source software used in this product.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found