

But when I try to import it, I do always get the same error: errorbuild companion. Gulp.task('copy:vendorjs',, function()/**/*. GulpUglifyError: unable to minify JavaScript Caused by: Synta圎rror: Unexpected token: name (Adapter) Uglify cannot parse ES6, it will throw you syntax errors. The main error to Unable to minifies JavaScript is the path not found. Hello, currently, I am trying to create an npm module and I already have published it here. Copy Task for assets that needs to be moved to /dist on build task Var runSequence = require('run-sequence') Var helpers = require('handlebars-helpers')() Var bs = require("browser-sync").create() This is part of my gulp congif: //Require specific modules But if I put the files inside those 2 blocks of references, I get the error I put above. Error GulpUglifyError: unable to minify JavaScript Caused by: Synta圎rror: Unexpected token: operator (>) File: Project/src/app/components/modals/bundle/modal. If I put those 4 files out of those blocks, when I run gulp build everything goes well but in the live environment I am getting 404 on those files.

But look at my folders structure:Īnd these blocks of references on the html:Īs you may see there are 2 blocks of references. I don't know where the error is coming from. gulp/tasks/default.js specifies the default set of tasks to run when you run gulp. EDIT: For regeneratorRuntime is not defined error, I think that regenerator-runtime could be helpful. GulpUglifyError: unable to minify JavaScriptĪt createError (/Users/berretan/Documents/Projects/promo-brochure/node_modules/gulp-uglify/lib/create-error.js:6:14)Īt wrapper (/Users/berretan/Documents/Projects/promo-brochure/node_modules/gulp-uglify/node_modules/lodash/_createHybrid.js:87:15)Īt trycatch (/Users/berretan/Documents/Projects/promo-brochure/node_modules/gulp-uglify/minifier.js:26:12)Īt DestroyableTransform.minify (/Users/berretan/Documents/Projects/promo-brochure/node_modules/gulp-uglify/minifier.js:76:19)Īt DestroyableTransform.Transform._read (/Users/berretan/Documents/Projects/promo-brochure/node_modules/readable-stream/lib/_stream_transform.js:159:10)Īt DestroyableTransform.Transform._write (/Users/berretan/Documents/Projects/promo-brochure/node_modules/readable-stream/lib/_stream_transform.js:147:83)Īt doWrite (/Users/berretan/Documents/Projects/promo-brochure/node_modules/readable-stream/lib/_stream_writable.js:347:64)Īt writeOrBuffer (/Users/berretan/Documents/Projects/promo-brochure/node_modules/readable-stream/lib/_stream_writable.js:336:5)Īt (/Users/berretan/Documents/Projects/promo-brochure/node_modules/readable-stream/lib/_stream_writable.js:274:11)Īt DestroyableTransform.ondata (/Users/berretan/Documents/Projects/promo-brochure/node_modules/readable-stream/lib/_stream_readable.js:546:20) To add a new task, simply add a new task file that directory. GulpUglifyError: unable to minify JavaScript Are you interested in Data Engineering Essentials course on Kontext Learn more. Had similar issue with gulp-uglify, and as Ive found out it seems that minifying async/await is not supported with base gulp-uglify, so I switched to babel-minify, and it worked for me. I am getting this error which got me crazy already: events.js:154
