hustxiaoc / gulp-minify

minify js plugin for gulp
BSD 2-Clause "Simplified" License
65 stars 20 forks source link

Upgrade to Gulp 4 #37

Closed rbatllet closed 6 years ago

rbatllet commented 6 years ago

Please, upgrade to Gulp 4, because it crashes:

Error: Received a non-Vinyl object in `dest()`
    at DestroyableTransform.normalize [as _transform] (/develop/myApp/node_modules/vinyl-fs/lib/dest/prepare.js:16:17)
    at DestroyableTransform.Transform._read (/develop/myApp/node_modules/readable-stream/lib/_stream_transform.js:182:10)
    at DestroyableTransform.Transform._write (/develop/myApp/node_modules/readable-stream/lib/_stream_transform.js:170:83)
    at doWrite (/develop/myApp/node_modules/readable-stream/lib/_stream_writable.js:406:64)
    at writeOrBuffer (/develop/myApp/node_modules/readable-stream/lib/_stream_writable.js:395:5)
    at DestroyableTransform.Writable.write (/develop/myApp/node_modules/readable-stream/lib/_stream_writable.js:322:11)
    at Pumpify.Duplexify._write (/develop/myApp/node_modules/duplexify/index.js:212:22)
    at doWrite (/develop/myApp/node_modules/readable-stream/lib/_stream_writable.js:406:64)
    at writeOrBuffer (/develop/myApp/node_modules/readable-stream/lib/_stream_writable.js:395:5)
    at Pumpify.Writable.write (/develop/myApp/node_modules/readable-stream/lib/_stream_writable.js:322:11)
    at DestroyableTransform.ondata (/develop/myApp/node_modules/readable-stream/lib/_stream_readable.js:612:20)
    at DestroyableTransform.emit (events.js:160:13)
    at addChunk (/develop/myApp/node_modules/readable-stream/lib/_stream_readable.js:284:12)
    at readableAddChunk (/develop/myApp/node_modules/readable-stream/lib/_stream_readable.js:271:11)
    at DestroyableTransform.Readable.push (/develop/myApp/node_modules/readable-stream/lib/_stream_readable.js:238:10)
    at DestroyableTransform.Transform.push (/develop/myApp/node_modules/readable-stream/lib/_stream_transform.js:146:32)

But the last Gulp 3 version works great!

morpheus-87 commented 6 years ago

I would say, the version of through2 is the main problem - the used one is more than 4(!) years old. Could you please upgrade to the latest version 2.0.3, @hustxiaoc?

TobiTenno commented 6 years ago

@hustxiaoc could this move forward? this seems like a pretty breaking change that should be fixed in order for consumers to move forward with gulp4

hustxiaoc commented 6 years ago

gulp4 is supported

oranges13 commented 5 years ago

I still have this error message. What do I need to do to upgrade or fix it?

rbatllet commented 5 years ago

@oranges13 The Complete-Ish Guide to Upgrading to Gulp 4: https://www.joezimjs.com/javascript/complete-guide-upgrading-gulp-4/

oranges13 commented 5 years ago

Seems like one of my packages was stuck at an older version that was using the deprecated dependency. Updating to gulp-minify 3.1.0 fixed the issue.