hugulp icon indicating copy to clipboard operation
hugulp copied to clipboard

Unable to minify Javascript error

Open crabdul opened this issue 9 years ago • 1 comments

When I run hugulp the following error is encountered.

Do I need to modify the gulp settings so that I can minify javascript in ES6 syntax?

`crabs-MBP:KARAI cr.ab2$ hugulp build [23:53:13] gulp-imagemin: Minified 0 images assets/scripts/radio.js: line 20, col 11, 'template literal syntax' is only available in ES6 (use 'esversion: 6'). assets/scripts/radio.js: line 22, col 28, 'template literal syntax' is only available in ES6 (use 'esversion: 6').

2 errors

events.js:183 throw er; // Unhandled 'error' event ^ GulpUglifyError: unable to minify JavaScript at createError (/usr/local/lib/node_modules/hugulp/node_modules/gulp-uglify/lib/create-error.js:6:14) at wrapper (/usr/local/lib/node_modules/hugulp/node_modules/gulp-uglify/node_modules/lodash/_createHybrid.js:87:15) at trycatch (/usr/local/lib/node_modules/hugulp/node_modules/gulp-uglify/minifier.js:26:12) at DestroyableTransform.minify [as _transform] (/usr/local/lib/node_modules/hugulp/node_modules/gulp-uglify/minifier.js:79:19) at DestroyableTransform.Transform._read (/usr/local/lib/node_modules/hugulp/node_modules/readable-stream/lib/_stream_transform.js:182:10) at DestroyableTransform.Transform._write (/usr/local/lib/node_modules/hugulp/node_modules/readable-stream/lib/_stream_transform.js:170:83) at doWrite (/usr/local/lib/node_modules/hugulp/node_modules/readable-stream/lib/_stream_writable.js:406:64) at writeOrBuffer (/usr/local/lib/node_modules/hugulp/node_modules/readable-stream/lib/_stream_writable.js:395:5) at DestroyableTransform.Writable.write (/usr/local/lib/node_modules/hugulp/node_modules/readable-stream/lib/_stream_writable.js:322:11) at DestroyableTransform.ondata (/usr/local/lib/node_modules/hugulp/node_modules/readable-stream/lib/_stream_readable.js:612:20)`

crabdul avatar Nov 21 '17 00:11 crabdul

No worries, I figured it out. I changed the javascript parser dependency to uglify-es

crabdul avatar Nov 21 '17 09:11 crabdul