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:
- Created 6 years ago
- Comments:17 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub 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.
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. 👍