question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Native cannot find variable self

See original GitHub issue

Intended 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:

image

How to reproduce the issue:

Version

  • apollo-client@1.9.0-1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:9
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rootedsoftwarecommented, Jul 31, 2017

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.

1reaction
acomitocommented, Jul 28, 2017

downgrade to apollo-client@1.9.0 worked for me, for now.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found