With latest version of gulp, we get following error when we build the application
/Volumes/UUI/Jedi/gulpfile.babel.js:3
import gulp from 'gulp';
^^^^^^
SyntaxError: Unexpected token import
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:511:25)
at loader (/Volumes/UUI/Jedi/node_modules/babel-register/lib/node.js:158:5)
at Object.require.extensions.(anonymous function) [as .js] (/Volumes/UUI/Jedi/node_modules/babel-register/lib/node.js:168:7)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)
Latest version of gulp doesn't automatically transpile gulpfile which is written in ES6.
We need additional dependecy gulp-cli for latest version of gulp.
Additionally, we also need to set babel preset config in either .babelrc or in our package.json.
Added this in package.json as well.
With latest version of gulp, we get following error when we build the application
Latest version of gulp doesn't automatically transpile gulpfile which is written in ES6. We need additional dependecy
gulp-cli
for latest version of gulp.Additionally, we also need to set babel preset config in either
.babelrc
or in ourpackage.json
. Added this in package.json as well.Changed files