React Native cannot find variable self
See original GitHub issueIntended outcome:
I started a new React Native project via yarn create react-native-app
and then yarn add apollo-client
. I try to import it like so:
import ApolloClient, { createNetworkInterface } from "apollo-client"
Actual outcome:
How to reproduce the issue:
Version
- apollo-client@1.9.0-1
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:10 (4 by maintainers)
Top Results From Across the Web
React Native Error - Can't find variable: self - Stack Overflow
Here I have attached a screenshot. The error is thrown from the file, located at node_modules > isomorphic-fetch > fetch-npm-browserify.
Read more >Error: Can't find variable: self · Issue #125 - GitHub
I am experiencing an error where self is undefined in React Native, which is a problem with this version of isomorphic-fetch .
Read more >Can't find variable: self when using datocms-client with react ...
Hi, I'm trying out DatoCMS with a react native app, but when I try to import anything from datocms-client (e.g. { SiteClient })...
Read more >Node.js – React Native Error – Can't find variable: self - iTecNote
After adding a node module, isomorphic-fetch (version : ^2.2.1) in React Native app, I am getting an error of Can't find variable: self...
Read more >[Solved]-react-native error Can't find variable - appsloveworld
Coding example for the question react-native error Can't find variable: styles-React Native.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
1.9.0 doesn’t exist. I deleted the node_modules directory, then removed apollo-client from the package.json file. I then did a
npm install apollo-client@1.9.0-0 --save
and it is working for me.downgrade to apollo-client@1.9.0 worked for me, for now.