Closed kirkov closed 9 years ago
@kirkov "drop_console" is supported by UglifyJS, and is listed right on that project's README.
Do you still have the error if the only difference is that you've removed "drop_console" from the configuration?
Also, can you provide the output of npm ls
.
I also have this error for this:
.pipe(uglify({compress:{ sequences:true, conditionals:true, booleans:true, unused:true, if_return:true, join_vars:true, drop_console:true }, mangle:true}))
Output:
C:\xampp\htdocs\gurushots\html\trunk\website\node_modules\gulp-uglify\node_modules\gulp-util\lib\PluginError.js:72
if (!this.message) throw new Error('Missing error message');
^
Error: Missing error message
at new PluginError (C:\xampp\htdocs\gurushots\html\trunk\website\node_modules\gulp-uglify\node_modules\gulp-util\lib
\PluginError.js:72:28)
at DestroyableTransform.minify [as _transform] (C:\xampp\htdocs\gurushots\html\trunk\website\node_modules\gulp-uglif
y\index.js:55:20)
at DestroyableTransform.Transform._read (C:\xampp\htdocs\gurushots\html\trunk\website\node_modules\gulp-uglify\node_
modules\through2\node_modules\readable-stream\lib\_stream_transform.js:184:10)
at DestroyableTransform.Transform._write (C:\xampp\htdocs\gurushots\html\trunk\website\node_modules\gulp-uglify\node
_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:172:12)
at doWrite (C:\xampp\htdocs\gurushots\html\trunk\website\node_modules\gulp-uglify\node_modules\through2\node_modules
\readable-stream\lib\_stream_writable.js:237:10)
at writeOrBuffer (C:\xampp\htdocs\gurushots\html\trunk\website\node_modules\gulp-uglify\node_modules\through2\node_m
odules\readable-stream\lib\_stream_writable.js:227:5)
at DestroyableTransform.Writable.write (C:\xampp\htdocs\gurushots\html\trunk\website\node_modules\gulp-uglify\node_m
odules\through2\node_modules\readable-stream\lib\_stream_writable.js:194:11)
at write (C:\xampp\htdocs\gurushots\html\trunk\website\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2
\node_modules\readable-stream\lib\_stream_readable.js:623:24)
at flow (C:\xampp\htdocs\gurushots\html\trunk\website\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\
node_modules\readable-stream\lib\_stream_readable.js:632:7)
at DestroyableTransform.pipeOnReadable (C:\xampp\htdocs\gurushots\html\trunk\website\node_modules\gulp\node_modules\
vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:664:5)
C:\xampp\htdocs\gurushots\html\trunk\website>
My npm ls
output is way too long to copy, and doesn't get printed as a whole..is cut in the top part. should I look for something in particular? Everything was working fine till recently.
IMHO this is fixed by 4cd6ae08ffadc70de536a0919dc7659d4fc26009, which drops:
PluginError(pluginName, e.message || e.msg, ...)
@kirkov and @yairEO: The expression moved from index.js line 55 to line 17 (respectively 18) with 14f50891494b09f5df97825fa74b3dabad4aeade
Since then there has been no PluginError
expression anymore which might throw such an error.
(See git grep "new PluginError" $(git rev-list --all)
)
If I have
drop_console: true
incompress
, I get this error: "Missing error message". I guess it's becausedrop_console
is no longer supported? I could not find it in the Uglify docs.If I remove it, it works fine. But maybe there should be a better error message?
Options:
Error output: