Skip to content
This repository was archived by the owner on Jul 9, 2021. It is now read-only.
This repository was archived by the owner on Jul 9, 2021. It is now read-only.

connect: react-native support for 0x connect #342

Open
@generalpiston

Description

@generalpiston

It seems 0x connect is using the isomorphic-fetch library which has no support for react-native. More specifically, I'm getting the following error:

Can't find variable: self

<unknown>
    fetch-npm-browserify.js:6:22
loadModuleImplementation
    require.js:213:12
<unknown>
    http_client.js:40
loadModuleImplementation
    require.js:213:12
<unknown>
    index.js:3:20
loadModuleImplementation
    require.js:213:12
<unknown>
    ....js:8
loadModuleImplementation
    require.js:213:12
<unknown>
    index.js:1
loadModuleImplementation
    require.js:213:12
<unknown>
    <unknown file>:0
loadModuleImplementation
    require.js:213:12
<unknown>
    index.js:8
loadModuleImplementation
    require.js:213:12
<unknown>
    index.js:4
loadModuleImplementation
    require.js:213:12
guardedLoadModule
    require.js:140:45
global code
    <unknown file>:0

This is coming from here: https://github.com/matthew-andrews/isomorphic-fetch/blob/master/fetch-npm-browserify.js#L6.

Work Around (Hack)

For now, I've been changing instances of self to global.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions