Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Unable to minify Javascript error #29

Closed
crabdul opened this issue Nov 21, 2017 · 1 comment
Closed

Unable to minify Javascript error #29

crabdul opened this issue Nov 21, 2017 · 1 comment

Comments

@crabdul
Copy link

crabdul commented Nov 21, 2017

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
Copy link
Author

crabdul commented Nov 21, 2017

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

@crabdul crabdul closed this as completed Nov 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant