Gozala / Gozala/reactor-commonjs

Browser Implementation Fails without Require

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Trying to load this in the browser, currently this produces an error

```
Uncaught TypeError: Cannot set property 'setTimeout' of undefined

localhost:8081/node_modules/event-queue/event-queue.js:66
```

at the time that you are trying to initialize it, exports does not exist. I think it has something to do with the opinion that this shouldn't be a standalone component (it seems like you are enforcing the use of require).

Check out http://caolanmcmahon.com/posts/writing_for_node_and_the_browser/

I had started to implement this but some of the [logic at the end of event-queue.js](https://github.com/Gozala/reactor-commonjs/blob/master/event-queue.js#L89) looks too fragile and I cannot understand your intentions clearly enough to be sure I won't break something. It looks like you're intending to throw an error to indicate the user must have require, but the error never throws

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.