I'm experimenting with using Cycle with React Native. Cycle depends on RxJS's npm package, which in turn requires Node's 'events' package, which I suppose does not exist in whatever environment React Native is running in.
The consequence is a runtime error Requiring unknown module "events". Cycle uses browserify, and the resulting bundle does not contain the RxJS code which requires 'events', that's why this runtime error does not happen with Cycle running in browsers.
I see some possible actions to solve this:
- Make
packager work more like browserify, using the same solutions.
- packager warning, instead of runtime error, for unknown modules required.
- RxJS's npm package should not have Node-specific functions, but instead put those in a special purpose
rx.node.js helper library. cc @mattpodwysocki
I believe this issue affects not only Cycle, but any time anyone attempts to use RxJS together with React Native.
I'm experimenting with using Cycle with React Native. Cycle depends on RxJS's npm package, which in turn requires Node's
'events'package, which I suppose does not exist in whatever environment React Native is running in.The consequence is a runtime error
Requiring unknown module "events". Cycle uses browserify, and the resulting bundle does not contain the RxJS code which requires 'events', that's why this runtime error does not happen with Cycle running in browsers.I see some possible actions to solve this:
packagerwork more like browserify, using the same solutions.rx.node.jshelper library. cc @mattpodwysockiI believe this issue affects not only Cycle, but any time anyone attempts to use RxJS together with React Native.