pileup.js
pileup.js copied to clipboard
Q thinks pileup.js is running under Node
If you set a breakpoint on q.js:163
, you'll see that this block evaluates:
if (typeof process !== "undefined" && process.nextTick) {
// Node.js before 0.9. Note that some fake-Node environments, like the
// Mocha test runner, introduce a `process` global without a `nextTick`.
isNodeJS = true;
requestTick = function () {
process.nextTick(flush);
};
}
Something is defining process.nextTick
in the production bundle, and it's making Q behave as though it's running under Node. I suspect this has negative repercussions in terms of error handling.
browserify automatically adds a shim for node's process
when it detects that a module uses it.
In this case, it looks like this is confusing Q.