You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
break in BufferList.prototype[inspect.custom] = function () { #355
Platform: Webpacked on node 8.8.1 webpack 4.16.5 running on current Firefox & Chrome
A change to readable-stream 3.0.1 from the previous 2.3.6 causes the following bug while loading the webpacked application on a browser, the application then fails to load.
A simple rollback to 2.3.6 fixes this, so it looks like something broken in the major release.
buffer_list.js:155 Uncaught TypeError: Cannot read property 'custom' of undefined
at eval (buffer_list.js:155)
at eval (buffer_list.js:161)
at Object../node_modules/readable-stream/lib/internal/streams/buffer_list.js (dweb-transports-bundle.js:16564)
at __webpack_require__ (dweb-transports-bundle.js:20)
at Object.eval (VM3191 _stream_readable.js:63)
at eval (VM3191 _stream_readable.js:1038)
at Object../node_modules/readable-stream/lib/_stream_readable.js (dweb-transports-bundle.js:16516)
at __webpack_require__ (dweb-transports-bundle.js:20)
at eval (VM3190 readable-browser.js:1)
at Object../node_modules/readable-stream/readable-browser.js (dweb-transports-bundle.js:16610)
The line in question is break in BufferList.prototype[inspect.custom] = function () {
And inspect is defined in:
var _require = __webpack_require__(/*! util */ 1),
inspect = _require.inspect;
I thought it might be just an undeclared dependency on inspect which I didn't find anywhere in package-lock.json, but even installing inspect (version 0.0.2) doesnt fix it, could it be an unforseen bad interaction with webpack ?
Activity
mcollina commentedon Aug 16, 2018
Thanks for reporting this!
It is the latter, I think their Node compatibility layer has not been updated in a bit of time.
On a side note, I think we should add some tests that verifies webpack compatibility.
Would you mind adding an example so I can verify the fix?
Import Node 10.9.0. Redo the fix for util.inspect.custom
mitra42 commentedon Aug 16, 2018
I'm not sure how to add a simple example for your test ... haven't worked on readable-streams (just using it in @internetarchive/dweb-transports).
Import Node 10.9.0. Redo the fix for util.inspect.custom (#357)
Main (#5)