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
.
Here I have attached a screenshot.
The error is thrown from the file, located at node_modules > isomorphic-fetch > fetch-npm-browserify.js
.
Following is the code of that file.
// the whatwg-fetch polyfill installs the fetch() function
// on the global object (window or self)
//
// Return that as the export for use in Webpack, Browserify etc.
require('whatwg-fetch');
module.exports = self.fetch.bind(self);