drapanjanas/re-natal

Uncaught Error: Unknown named module: 'xmlhttprequest'

igrishaev opened this issue · 2 comments

I’m developing a re-natal driven app. I’d like to use re-frame-http-fx to for HTTP communication with the server. The problem is, when I import it, I get an error re-natal Uncaught Error: Unknown named module: 'xmlhttprequest'.

I know this is because clj-ajax tries to import that module when the platform is Node.js. I installed that library from npm and added it into re-natal config as follows:

re-natal require xmlhttprequest

Yet it produces another error saying the Metro bundle could not build a bundle because of missing url package. I tried to add it too but it lead to some third error with unclear statement.

Does anybody have experience using :http-xhrio with react native?

The problem is in clj-ajax

Reason: JulianBirch/cljs-ajax#218 (just for cross reference)