title: React-Native: Error: ENOENT: no such file or directory, open 'MainApplication.java'
body: <p>I am running <code>react-native link</code> in my React Native project directory. </p>
  
  <p>When running this I am getting the error:</p>
  
  <pre><code>Error: ENOENT: no such file or directory, open '/Users/**********/f8app/android/app/src/main/java/com/facebook/f8/MainApplication.java'
  </code></pre>
  
  <p>However, this file does exist. </p>
  
  <p>Full output:</p>
  
  <pre><code>(@):f8app *************$ react-native link
  { Error: Cannot find module '/Users/************/f8app/node_modules/moment/package.json'
      at Function.Module._resolveFilename (module.js:455:15)
      at Function.Module._load (module.js:403:25)
      at Module.require (module.js:483:17)
      at require (internal/module.js:20:19)
      at getRNPMConfig (/Users/***********/f8app/node_modules/react-native/local-cli/rnpm/core/src/config/index.js:13:10)
      at Object.getDependencyConfig (/Users/************/f8app/node_modules/react-native/local-cli/rnpm/core/src/config/index.js:38:14)
      at /Users/**************/f8app/node_modules/react-native/local-cli/rnpm/link/src/getDependencyConfig.js:11:24
      at Array.reduce (native)
      at getDependencyConfig (/Users/***********/f8app/node_modules/react-native/local-cli/rnpm/link/src/getDependencyConfig.js:8:15)
      at link (/Users/***********/f8app/node_modules/react-native/local-cli/rnpm/link/src/link.js:114:22) code: 'MODULE_NOT_FOUND' }
  ? What is your CodePush deployment key for Android (hit &lt;ENTER&gt; to ignore) 
  rnpm-link info Linking react-native-code-push android dependency 
  rnpm-link ERR! It seems something went wrong while linking. Error: ENOENT: no such file or directory, open '/Users/***********/f8app/android/app/src/main/java/com/facebook/f8/MainApplication.java' 
  Please file an issue here: https://github.com/rnpm/rnpm/issues 
  /Users/*****************/f8app/node_modules/react-native/node_modules/promise/lib/done.js:10
        throw err;
        ^
  
  Error: ENOENT: no such file or directory, open '/Users/**********/f8app/android/app/src/main/java/com/facebook/f8/MainApplication.java'
      at Error (native)
      at Object.fs.openSync (fs.js:640:18)
      at Object.fs.readFileSync (fs.js:508:33)
      at applyPatch (/Users/***********/f8app/node_modules/react-native/local-cli/rnpm/link/src/android/patches/applyPatch.js:6:29)
      at registerNativeAndroidModule (/Users/**********/f8app/node_modules/react-native/local-cli/rnpm/link/src/android/registerNativeModule.js:23:3)
      at /Users/***********/f8app/node_modules/react-native/local-cli/rnpm/link/src/link.js:55:5
      at process._tickCallback (internal/process/next_tick.js:103:7) 
  </code></pre>