title: Error: jest-haste-map: @providesModule naming collision when using a local dependency
body: <p>I'm using a local module in <code>package.json</code> that also has <code>react-native</code> as a dependency.</p>
  
  <p>In my APP <code>package.json</code>:</p>
  
  <pre><code>"react": "16.4.1",
  "react-native": "0.56.0",
  "react-native-services": "file:///Users/R01/Projects/react-native-services"
  </code></pre>
  
  <p>In  my <code>react-native-services</code> <code>package.json</code>:</p>
  
  <pre><code>"react": "16.4.1",
  "react-native": "0.56.0"
  </code></pre>
  
  <p>So when running <code>react-native run-android</code> the Metro Bundler throws:</p>
  
  <pre><code>Looking for JS files in
     /Users/R01/Projects/RNApp
     /Users/R01/Projects/react-native-services 
  
  
  Metro Bundler ready.
  
  Loading dependency graph...(node:72824) UnhandledPromiseRejectionWarning: Error: jest-haste-map: @providesModule naming collision:
    Duplicate module name: Sample
    Paths: /Users/R01/Projects/react-native-services/node_modules/react-native/Libraries/Sample/package.json collides with /Users/R01/Projects/RNApp/node_modules/react-native/Libraries/Sample/package.json
  
   This error is caused by a @providesModule declaration with the same name across two different files.
      at setModule (/Users/R01/Projects/RNApp/node_modules/jest-haste-map/build/index.js:446:17)
      at workerReply (/Users/R01/Projects/RNApp/node_modules/jest-haste-map/build/index.js:496:9)
      at &lt;anonymous&gt;
      at process._tickCallback (internal/process/next_tick.js:182:7)
  (node:72824) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
  (node:72824) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  error: bundling failed: Error: jest-haste-map: @providesModule naming collision:
    Duplicate module name: Sample
    Paths: /Users/R01/Projects/react-native-services/node_modules/react-native/Libraries/Sample/package.json collides with /Users/R01/Projects/RNApp/node_modules/react-native/Libraries/Sample/package.json
  
  This error is caused by a @providesModule declaration with the same name across two different files.
      at setModule (/Users/R01/Projects/RNApp/node_modules/jest-haste-map/build/index.js:446:17)
      at workerReply (/Users/R01/Projects/RNApp/node_modules/jest-haste-map/build/index.js:496:9)
      at &lt;anonymous&gt;
      at process._tickCallback (internal/process/next_tick.js:182:7)
  </code></pre>
  
  <p>I already tried:</p>
  
  <ul>
  <li>With both <code>npm</code> and <code>yarn</code>  (upgraded) installations but <code>react-native run-android</code> throws always the same error.</li>
  <li>watchman watch-del-all rm -rf node_modules &amp;&amp; npm install rm -fr $TMPDIR/react-* npm cache clean npm start -- --reset-cache</li>
  </ul>