Question: I get the following error when trying to use gulp-babel:

> 
> Error: Couldn't find preset "es2015" relative to directory
>  "/Users/username"
> 
> 
> 

I have the es2015 preset installed globally and locally so can't see why this would be an issue.

Below is my gulp set up and package.json.

```
var babel = require('gulp-babel');
var es2015 = require('babel-preset-es2015');

gulp.task('babel', function() {
    return gulp.src('./app/main.js')
    .pipe(babel({
        presets: [es2015]
    }))
    .pipe(gulp.dest('dist'));
});

```

Package.json

```
  "devDependencies": {
    "babel-preset-es2015": "^6.3.13",
    "babel-preset-es2015-node5": "^1.1.1",
    "browser-sync": "^2.11.0",
    "gulp": "^3.9.0",
    "gulp-babel": "^6.1.1",
    "gulp-stylus": "^2.2.0"
  }

```

I am using node v5.1.0 and babel v6.4.0

Here is the terminal ouput

[terminal output](http://i.stack.imgur.com/JMwPp.png)

Answer: 
You could try installing `es2015` and `stage-2` via

```
npm i babel-preset-es2015 --save
npm i babel-preset-stage-2 --save

```
Babel 7 update
--------------

From the [docs](https://babeljs.io/docs/en/v7-migration#yearly-preset-deprecations-blog-2017-12-27-nearing-the-70-releasehtml-deprecated-yearly-presets-eg-babel-preset-es20xx) you should now use `@babel/preset-env` instead of any other `preset` mention

> 
> The "env" preset has been out for more than a year now, and completely replaces some of the presets we've had/suggested earlier.
> 
> 
> * babel-preset-es2015
> * babel-preset-es2016
> * babel-preset-es2017
> * babel-preset-latest
> * A combination of the above ^
> 
> 
> 

```
yarn add @babel/preset-env

```

or

```
npm install @babel/preset-env

```