Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix babel handling for node: DEFAULT_ENGINES #827

Merged
merged 1 commit into from
Feb 16, 2018

Conversation

lbguilherme
Copy link
Contributor

If bundling anything with --target=node, the following error will be thrown:

🚨  Error: Invalid version passed for target "node": ">= 6.0.0". Versions must be in semver format (major.minor.patch)
    at /home/guilherme/Cubos/zak-api/node_modules/babel-preset-env/lib/index.js:69:13
    at Array.filter (<anonymous>)
    at isPluginRequired (/home/guilherme/Cubos/zak-api/node_modules/babel-preset-env/lib/index.js:59:54)
    at filterItem (/home/guilherme/Cubos/zak-api/node_modules/babel-preset-env/lib/index.js:99:20)
    at Array.filter (<anonymous>)
    at Object.buildPreset [as default] (/home/guilherme/Cubos/zak-api/node_modules/babel-preset-env/lib/index.js:149:56)
    at getEnvPlugins (/home/guilherme/Cubos/zak-api/node_modules/parcel-bundler/src/transforms/babel.js:250:34)
    at getEnvConfig (/home/guilherme/Cubos/zak-api/node_modules/parcel-bundler/src/transforms/babel.js:217:25)

For node, specifying >= 6 is wrong, it should say just 6.

If possible, please release 1.6.2 with this fix, otherwise targeting node won't work

For node, specifying `>= 6` is wrong, it should say just `6`
@lbguilherme
Copy link
Contributor Author

Workaround: Add this to your package.json:

  "engines": {
    "node": "6"
  },

@codecov-io
Copy link

Codecov Report

Merging #827 into master will increase coverage by 0.56%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #827      +/-   ##
==========================================
+ Coverage   91.27%   91.84%   +0.56%     
==========================================
  Files          68       68              
  Lines        3555     3727     +172     
==========================================
+ Hits         3245     3423     +178     
+ Misses        310      304       -6
Impacted Files Coverage Δ
src/utils/getTargetEngines.js 98.79% <ø> (+0.06%) ⬆️
src/assets/RustAsset.js 91.81% <0%> (-4.11%) ⬇️
src/assets/TOMLAsset.js 100% <0%> (ø) ⬆️
src/assets/YAMLAsset.js 100% <0%> (ø) ⬆️
src/transforms/babel.js 96.66% <0%> (+0.17%) ⬆️
src/transforms/uglify.js 95.83% <0%> (+0.18%) ⬆️
src/assets/JSAsset.js 96.21% <0%> (+0.41%) ⬆️
src/visitors/dependencies.js 92.95% <0%> (+0.53%) ⬆️
src/assets/TypeScriptAsset.js 97.5% <0%> (+0.62%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e12975...b28497f. Read the comment docs.

@devongovett devongovett merged commit c7ba56a into master Feb 16, 2018
@devongovett devongovett deleted the lbguilherme-patch-1 branch February 16, 2018 17:17
devongovett pushed a commit that referenced this pull request Oct 15, 2018
For node, specifying `>= 6` is wrong, it should say just `6`
devongovett pushed a commit that referenced this pull request Oct 15, 2018
For node, specifying `>= 6` is wrong, it should say just `6`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants