Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Problem with expo client #145

Closed
rtpm opened this issue Mar 29, 2018 · 4 comments
Closed

Problem with expo client #145

rtpm opened this issue Mar 29, 2018 · 4 comments

Comments

@rtpm
Copy link

rtpm commented Mar 29, 2018

Hello, not sure if this is not expo client related. Trying to use Fetch with my expo react native project.
When using in one of my components I get an error below. The problem doesn't appear when turning remoteJS debug on in expo.

I'm using a standard <Fetch> with data/failed/fetching props. Importing via import { Fetch } from 'react-request' v. 2.0.3

undefined is not an object (evaluating 'globalObj.AbortSignal')

R:\dev\tres2\app\tres2-proxy\node_modules\react-request\lib\fetch.js:339:33 loadModuleImplementation R:\dev\tres2\app\tres2-proxy\node_modules\metro\src\lib\polyfills\require.js:213:12 R:\dev\tres2\app\tres2-proxy\node_modules\react-request\lib\index.js:6:13 loadModuleImplementation R:\dev\tres2\app\tres2-proxy\node_modules\metro\src\lib\polyfills\require.js:213:12 R:\dev\tres2\app\tres2-proxy\components\Invoice.js:6 loadModuleImplementation R:\dev\tres2\app\tres2-proxy\node_modules\metro\src\lib\polyfills\require.js:213:12 R:\dev\tres2\app\tres2-proxy\App.js:11 loadModuleImplementation R:\dev\tres2\app\tres2-proxy\node_modules\metro\src\lib\polyfills\require.js:213:12 R:\dev\tres2\app\tres2-proxy\node_modules\expo\AppEntry.js:2 loadModuleImplementation R:\dev\tres2\app\tres2-proxy\node_modules\metro\src\lib\polyfills\require.js:213:12 guardedLoadModule R:\dev\tres2\app\tres2-proxy\node_modules\metro\src\lib\polyfills\require.js:140:45 global code :0
@jamesplease jamesplease added the help wanted Extra attention is needed label Mar 29, 2018
@jamesplease
Copy link
Owner

Hi! I’ve never used React Native, so I’m going to need some help with this one 🙂

@rtpm
Copy link
Author

rtpm commented Mar 29, 2018

Probably something with babel/Node.

facebook/react-native#14838

Will try to udpate NodeJS to 8 as it seems to solve problem for some.

@rtpm
Copy link
Author

rtpm commented Apr 3, 2018

Could be something with globals not exposed in react-native.

https://github.com/johanneslumpe/react-native-browser-polyfill/blob/master/polyfills/globalself.js

@jamesplease
Copy link
Owner

Agreed @rtpm . I'll add a note to the README about including that polyfill for use in React Native.

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

No branches or pull requests

2 participants