javascript - Error: Couldn't find preset "es2015" relative to directory "/Users/username" -
i following error when trying use gulp-babel:
error: couldn't find preset "es2015" relative directory "/users/username"
i have es2015 preset installed globally , locally can't see why issue.
below gulp set , 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 using node v5.1.0 , babel v6.4.0
here terminal ouput
you need install babel-preset-es2015
:
cli usage example:
npm install babel-cli babel-preset-es2015
Comments
Post a Comment