Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upError on dependency parsing by JSPM #1481
Closed
Labels
Comments
This comment has been minimized.
This comment has been minimized.
|
There must be a module extending but not calling super() that was refactored to ES6 |
This comment has been minimized.
This comment has been minimized.
|
Here's what threw the error from the minified build using that line:column from the trace (beautified) class o extends r.Writable {
constructor(e, t, r) {
function o(t) {
this.destroyed || (e.put(i, t), i += 1)
}
if (super(r), r || (r = {}), !e || !e.put || !e.get) {
throw new Error("First argument must be an abstract-chunk-store compliant store");
}
if (t = +t, !t) throw new Error("Second argument must be a chunk length");
this._blockstream = new n(t, {
zeroPadding: !1
}), this._blockstream.on("data", o).on("error", e => {
this.destroy(e)
});
let i = 0;
this.on("finish", function() {
this._blockstream.end()
})
}This is clearly from here https://github.com/feross/chunk-store-stream/blob/v3.0.0/write.js I think the function onData() (here) is getting pushed up above |
DiegoRBaquero
added a commit
to DiegoRBaquero/chunk-store-stream
that referenced
this issue
Aug 26, 2018
Function hoisting is breaking WebTorrent build, see webtorrent/webtorrent#1481.
Merged
This comment has been minimized.
This comment has been minimized.
|
Published the fix in chunk-store-stream 3.0.1 |
This comment has been minimized.
This comment has been minimized.
|
@feross missed the other PR with a minor change :p |
This comment has been minimized.
This comment has been minimized.
|
Is this a bug in the minifier? Should we open an issue? |
This comment has been minimized.
This comment has been minimized.
|
@KayleePop Nope :) Fix published as 0.102.2 :) |
This comment has been minimized.
This comment has been minimized.
|
Thanks for the quick fix!!! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
0.102.1
Ubuntu 16.04
Chrome, Chromium, Firefox -> latest
What did you expect to happen?
sfx bundle
What actually happened?
Error on dependency parsing for github:webtorrent/webtorrent@0.102.1/webtorrent.min.js at file:///.../jspm_packages/github/webtorrent/webtorrent@0.102.1/webtorrent.min.js
=> MultipleErrors: :1:98229: 'this' is not allowed before super()