Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to use module with browserify #15

Closed
andrewrk opened this issue Jul 22, 2013 · 2 comments
Closed

unable to use module with browserify #15

andrewrk opened this issue Jul 22, 2013 · 2 comments

Comments

@andrewrk
Copy link

the try/catch dependency on EventEmitter defeats browserify's module resolution. This is one example of why I kept insisting that we should try to have the dependency resolution in component (for example) look the same as node.

I know you'd like to pretend that browserify doesn't exist, but if the stated goal for the module is "Async batch with concurrency control and progress reporting for nodejs and the browser" then one good metric would be whether it works in browserify.

@stephenmathieson
Copy link
Contributor

it's a horrible hack, but i think this works:

try {
  var EventEmitter = require('events').EventEmitter;
} catch (err) {
  var browserifyhack = require;
  var Emitter = browserifyhack('emitter');
}

@tj
Copy link
Member

tj commented Dec 12, 2013

oops this should be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants