title: TypeError:null is not an object(evaluating 'RNFSManager.RNFSFileTypeRegular')
body: <p>I am currently working on reading a local file in react-native and am running into the following error, </p>
  
  <p><code>TypeError:null is not an object(evaluating 'RNFSManager.RNFSFileTypeRegular')</code></p>
  
  <p>The code I am using is taken straight off of the <a href="https://github.com/itinance/react-native-fs" rel="nofollow noreferrer">documentation for react-native-fs</a> , using the basic example, from the examples section:</p>
  
  <pre><code>// require the module
  var RNFS = require('react-native-fs');
  
  // get a list of files and directories in the main bundle
  RNFS.readDir(RNFS.MainBundlePath) // On Android, use "RNFS.DocumentDirectoryPath" (MainBundlePath is not defined)
    .then((result) =&gt; {
      console.log('GOT RESULT', result);
  
      // stat the first file
      return Promise.all([RNFS.stat(result[0].path), result[0].path]);
    })
    .then((statResult) =&gt; {
      if (statResult[0].isFile()) {
        // if we have a file, read it
        return RNFS.readFile(statResult[1], 'utf8');
      }
  
      return 'no file';
    })
    .then((contents) =&gt; {
      // log the file contents
      console.log(contents);
    })
    .catch((err) =&gt; {
      console.log(err.message, err.code);
    });
  </code></pre>
  
  <p>If it helps I am using vs when writing this on a Windows 10 computer. </p>
  
  <p>I have tried resetting my cache, reinstalling react-native-fs, and linking react-native-fs, none have solved the problem all resulting in the same error. </p>
  
  <p>I would greatly appreciate any help. Thank you. </p>