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.

[gulp-babel@7.0.1] ReferenceError: Using removed Babel 6 option: .sourceMapTarget

See original GitHub issue

When using gulp with this gulpfile.babel.js:

import gulp from 'gulp';
import babel from 'gulp-babel';

gulp.task('default', function() {
  return gulp
    .src('src/**/*.js')
    .pipe(babel())
    .pipe(gulp.dest('dist'));
})

With these versions:

  "devDependencies": {
    "@babel/core": "^7.0.0-beta.44",
    "@babel/preset-env": "^7.0.0-beta.44",
    "gulp": "^3.9.1",
    "gulp-babel": "^7.0.1"
  },

I get this error: ReferenceError: Using removed Babel 6 option: .sourceMapTarget - The sourceMapTarget option has been removed because it makes more sense for the tooling that calls Babel to assign map.file themselves.

I fixed it inside my own node_modules, by removing the offending line (index.js:33).

Should this option be removed entirely or did I miss something ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

17reactions
loganfsmythcommented, Apr 10, 2018
"gulp-babel": "^7.0.1"

is for Babel 6. If you’re using Babel 7 you need to be using 8.0.0-beta.2

2reactions
EBEREGITcommented, Nov 20, 2019

yaayh… I solved it. I ran the following code and everything runs properly

npm install gulp-babel@8.0.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BABEL] unknown: Using removed Babel 5 option: base ...
I'm getting this error while running my gulpfile. I'm assuming that there's something wrong with my Babel version.
Read more >
Upgrade to Babel 7
Support for Node.js 0.10, 0.12, 4 and 5 has been dropped #5025, #5041, ... In 7.1, we've introduced a rootMode option for further...
Read more >
Options - Babel.js
Options can be passed to Babel in a variety of ways. When passed directly to Babel, you can just pass the options object....
Read more >
babel/plugin-transform-runtime
A plugin that enables the re-use of Babel's injected helper code to save on ... With options (and their defaults): ... This option...
Read more >
babel/preset-env
This both makes your life easier and JavaScript bundles smaller! Install; How Does it Work? Browserslist Integration; Options. Install. With npm: npm install ......
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