vinyl-fs complains about non-Vinyl object but doesn't clearly provide the source #2453
-
I am trying to upgrade from gulp 3 to gulp 4 and have the following error log:
As you can see, the stack-trace only mentions three node modules: vinyl-fs, readable-stream and deduplexify - the other two being dependencies of vinyl-fs. So it's difficult to workout what is passing a non-Vinyl object to vinyl-fs. The task itself runs other NPM modules but none of those are mentioned in the stack-trace. What's the best mechanism for going about debugging this issue. I only have 1 copy of vinyl-fs in my yarn.lock, v3.0.3. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Node doesn't have very good stacktraces in general, and they are especially bad with streams. You aren't going to see the name of the plugin in the stacktrace so you will need to debug it by isolating which task is causing the issue, then isolate which plugin is causing it. You can also add a debug statement to |
Beta Was this translation helpful? Give feedback.
-
@philipwhiuk that error means that you have something in your pipeline (likely a misbehaving plugin) that is generating non-Vinyl objects. Maybe they are mocking a couple of properties on a plain object or something. Note: if they were generating "old" Vinyl objects, vinyl-fs would automatically upgrade them to newer Vinyl objects (some properties changed). |
Beta Was this translation helpful? Give feedback.
Node doesn't have very good stacktraces in general, and they are especially bad with streams. You aren't going to see the name of the plugin in the stacktrace so you will need to debug it by isolating which task is causing the issue, then isolate which plugin is causing it. You can also add a debug statement to
vinyl-fs/lib/dest/prepare.js:16
and log the object for more information.