events.js:167 throw er; // Unhandled 'error' event
UisgeBeatha436 opened this issue · 2 comments
After upgrading to a new version of my template-framework, I'm getting the following error after running ~gulp jsES5. Been searching the net for quit some time, however don't seem to be able to solve it.
GulpUglifyError: unable to minify JavaScript
at createError (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-uglify/lib/create-error.js:5:14)
at /Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-uglify/lib/minify.js:56:15
at DestroyableTransform._transform (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-uglify/composer.js:12:19)
at DestroyableTransform.Transform._read (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-uglify/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at DestroyableTransform.Transform._write (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-uglify/node_modules/readable-stream/lib/_stream_transform.js:172:83)
at doWrite (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-uglify/node_modules/readable-stream/lib/_stream_writable.js:428:64)
at writeOrBuffer (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-uglify/node_modules/readable-stream/lib/_stream_writable.js:417:5)
at DestroyableTransform.Writable.write (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-uglify/node_modules/readable-stream/lib/_stream_writable.js:334:11)
at DestroyableTransform.ondata (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:619:20)
at DestroyableTransform.emit (events.js:182:13)
Emitted 'error' event at:
at DestroyableTransform.EventEmitter.emit (domain.js:455:12)
at DestroyableTransform.onerror (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:640:52)
at DestroyableTransform.emit (events.js:182:13)
at DestroyableTransform.EventEmitter.emit (domain.js:442:20)
at onwriteError (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-uglify/node_modules/readable-stream/lib/_stream_writable.js:443:12)
at onwrite (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-uglify/node_modules/readable-stream/lib/_stream_writable.js:470:11)
at WritableState.onwrite (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-uglify/node_modules/readable-stream/lib/_stream_writable.js:180:5)
at DestroyableTransform.afterTransform (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-uglify/node_modules/readable-stream/lib/_stream_transform.js:93:3)
at DestroyableTransform._transform (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-uglify/composer.js:16:7)
at DestroyableTransform.Transform._read (/Users/xxxxxxxx/Sites/cmsms_builder/node_modules/gulp-uglify/node_modules/readable-stream/lib/_stream_transform.js:184:10)
Already did:
- rm -f node_modules
- npm install
- killall node ---> no effect. npm start errors because it doesn't know 'start'
I'm not familiar on how or where to add additional error logging or so. Any help is highly appreciated.
Thanks.
Thanks for getting back @terinjokes I had a look at at it. The part of the code responding the error is:
/**
* @param {*} error
*/
export function customError(error) {
if (typeof error !== 'undefined') {
throw error;
}
};
And I was puzzeling. how I can incorporate your suggestion into the above code. That's where I got stuck. Any help is highly appreciated.