title: Can't find variable: Buffer
body: <p>I'm trying to use node modules in my react-native app, and I'm taking the <a href="https://github.com/philikon/ReactNativify/" rel="noreferrer">ReactNativify</a> approach here. </p>
  
  <p>I'm all set up now, and I got the crypto package to load in fine. However when I added in <a href="https://www.npmjs.com/package/eth-lightwallet" rel="noreferrer">eth-lightwallet</a> things have been getting weird.</p>
  
  <p>Every since I added that package in, npm hasn't been installing dependancies of anything. Meaning I've had to add them in manually. And everytime I install a dependency somehow related to eth-lightwallet, that module is uninstalled. Although tedious and annoying, I'm hoping it can shed light onto my current problem.</p>
  
  <p>Right now I'm running into a <code>Can't find variable: Buffer</code> which is being thrown in a util folder in the standard library. I've taken a look at the code and it's accessing Buffer from a global namespace. Thing is, I'm importing Buffer into the global namespace. Here's a look at my global.js</p>
  
  <pre><code>// Inject node globals into React Native global scope.
  global.Buffer = require('buffer').Buffer;
  global.process = require('process');
  global.process.env.NODE_ENV = __DEV__ ? 'development' : 'production';
  
  // Needed so that 'stream-http' chooses the right default protocol.
  global.location = {
      protocol: 'file:',
  };
  
  // Don't do this in production. You're going to want to patch in
  // https://github.com/mvayngrib/react-native-randombytes or similar.
  global.crypto = {
      getRandomValues(byteArray) {
          for (let i = 0; i &lt; byteArray.length; i++) {
              byteArray[i] = Math.floor(256 * Math.random());
          }
      },
  };
  </code></pre>
  
  <p>My guess is the standard library is being evaluated before this global is being loaded in, and thus the error is thrown.</p>