title: react-native : Unable to resolve module `tty` from ''.../node_modules/window-size/index.js": Module does not exist in the module map
body: <blockquote>
    <p>Error</p>
  </blockquote>
  
  <pre><code>    loading dependency graph, done.
      error: bundling failed: Error: Unable to resolve module `tty` from `/MyWorks/rnTestTrials/myCurrencySample/node_modules/window-size/index.js`: Module does not exist in the module map
  
      This might be related to https://github.com/facebook/react-native/issues/4968
      To resolve try the following:
        1. Clear watchman watches: `watchman watch-del-all`.
        2. Delete the `node_modules` folder: `rm -rf node_modules &amp;&amp; npm install`.
        3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`.  
        4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`.
          at ModuleResolver.resolveDependency (/MyWorks/rnTestTrials/myCurrencySample/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:158:1476)
          at ResolutionRequest.resolveDependency (/MyWorks/rnTestTrials/myCurrencySample/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:92:16)
          at DependencyGraph.resolveDependency (/MyWorks/rnTestTrials/myCurrencySample/node_modules/metro/src/node-haste/DependencyGraph.js:271:4465)
          at dependencies.map.relativePath (/MyWorks/rnTestTrials/myCurrencySample/node_modules/metro/src/DeltaBundler/traverseDependencies.js:379:19)
          at Array.map (&lt;anonymous&gt;)
          at resolveDependencies (/MyWorks/rnTestTrials/myCurrencySample/node_modules/metro/src/DeltaBundler/traverseDependencies.js:378:16)
          at /MyWorks/rnTestTrials/myCurrencySample/node_modules/metro/src/DeltaBundler/traverseDependencies.js:203:33
          at Generator.next (&lt;anonymous&gt;)
          at step (/MyWorks/rnTestTrials/myCurrencySample/node_modules/metro/src/DeltaBundler/traverseDependencies.js:296:307)
          at /MyWorks/rnTestTrials/myCurrencySample/node_modules/metro/src/DeltaBundler/traverseDependencies.js:296:467
       BUNDLE  [ios, dev] ./index.js ▓▓▓▓▓▓▓▓▓░░░░░░░ 60.2% (291/375), failed.
  </code></pre>
  
  <p>--</p>
  
  <p>I tired the given solution in the error , and delete and re-initiate npm
   and also delete build from <code>"./ios"</code> and run again <code>'react-native run-ios'</code></p>
  
  <p>this app working perfectily, but sudden shows this error and stop working,</p>
  
  <p><a href="https://i.stack.imgur.com/l9ZQZ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/l9ZQZ.png" alt="enter image description here"></a></p>
  
  <p>tired all npm_module related solutions in the web, </p>
  
  <blockquote>
    <p>versions</p>
  </blockquote>
  
  <pre><code>react-native-cli: 2.0.1
  react-native: 0.54.0
  </code></pre>
  
  <blockquote>
    <p>package.json</p>
  </blockquote>
  
  <pre><code>{
    "name": "myCurrencySample",
    "version": "0.0.1",
    "private": true,
    "scripts": {
      "start": "node node_modules/react-native/local-cli/cli.js start",
      "test": "jest"
    },
    "dependencies": {
      "color": "2.0.0",
      "moment": "2.18.1",
      "react": "^16.3.0-alpha.1",
      "react-native": "^0.54.0",
      "react-native-extended-stylesheet": "^0.8.1"
    },
    "devDependencies": {
      "babel-jest": "22.4.1",
      "babel-preset-react-native": "4.0.0",
      "jest": "22.4.2",
      "react-test-renderer": "^16.3.0-alpha.1"
    },
    "jest": {
      "preset": "react-native"
    }
  }
  </code></pre>
  
  <p>please help,</p>