title: How do I solve "Cannot find module" error
body: <p>I want to build a website using React witht he help of npm and webpack. I have installed npm in my machine and now I am trying to install webpack in my machine.
  I ran the following command:</p>
  
  <p>npm i webpack -S</p>
  
  <p>but then it throws error. Please find the error log below:</p>
  
  <pre><code>npm http 200 https://registry.npmjs.org/is-buffer
  npm http GET https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz
  npm http 200 https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz
  
  &gt; uglifyjs-webpack-plugin@0.4.6 postinstall /usr/local/litle-home/tkale/cvs/scurvyReact/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
  &gt; node lib/post_install.js
  
  
  module.js:340
      throw err;
            ^
  Error: Cannot find module 'sync-exec'
      at Function.Module._resolveFilename (module.js:338:15)
      at Function.Module._load (module.js:280:25)
      at Module.require (module.js:364:17)
      at require (module.js:380:17)
      at Object.&lt;anonymous&gt; (/usr/local/litle-home/tkale/cvs/scurvyReact/node_modules/webpack/node_modules/uglifyjs-webpack-plugin/lib/post_install.js:9:14)
      at Module._compile (module.js:456:26)
      at Object.Module._extensions..js (module.js:474:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:312:12)
      at Function.Module.runMain (module.js:497:10)
  npm ERR! weird error 8
  npm ERR! Error: ENOENT, open '/usr/local/litle-home/tkale/tmp/npm-1220-UQjjVtpG/1508423156518-0.5044926188420504/package/fp/wrapperValue.js'
  npm ERR! If you need help, you may report this log at:
  npm ERR!     &lt;http://github.com/isaacs/npm/issues&gt;
  npm ERR! or email it to:
  npm ERR!     &lt;npm-@googlegroups.com&gt;
  
  npm ERR! System Linux 2.6.32-696.10.2.el6.x86_64
  npm ERR! command "node" "/usr/bin/npm" "i" "webpack" "-S"
  npm ERR! cwd /usr/local/litle-home/tkale/cvs/scurvyReact
  npm ERR! node -v v0.10.48
  npm ERR! npm -v 1.3.6
  npm ERR! path /usr/local/litle-home/tkale/tmp/npm-1220-UQjjVtpG/1508423156518-0.5044926188420504/package/fp/wrapperValue.js
  npm ERR! code ENOENT
  npm ERR! errno 34
  npm ERR! tar pack Error reading /usr/local/litle-home/tkale/tmp/npm-1220-UQjjVtpG/1508423163147-0.8487295310478657/package
  npm ERR! addLocalDirectory Could not pack "/usr/local/litle-home/tkale/tmp/npm-1220-UQjjVtpG/1508423163147-0.8487295310478657/package" to "/usr/local/litle-home/tkale/.npm/es5-ext/0.10.35/package.tgz"
  npm ERR! Error: ENOENT, lstat '/usr/local/litle-home/tkale/tmp/npm-1220-UQjjVtpG/1508423153445-0.9213839254807681/package/node_modules/ajv/dist/regenerator.min.js'
  npm ERR! If you need help, you may report this log at:
  npm ERR!     &lt;http://github.com/isaacs/npm/issues&gt;
  npm ERR! or email it to:
  npm ERR!     &lt;npm-@googlegroups.com&gt;
  
  npm ERR! System Linux 2.6.32-696.10.2.el6.x86_64
  npm ERR! command "node" "/usr/bin/npm" "i" "webpack" "-S"
  npm ERR! cwd /usr/local/litle-home/tkale/cvs/scurvyReact
  npm ERR! node -v v0.10.48
  npm ERR! npm -v 1.3.6
  npm ERR! path /usr/local/litle-home/tkale/tmp/npm-1220-UQjjVtpG/1508423153445-0.9213839254807681/package/node_modules/ajv/dist/regenerator.min.js
  npm ERR! fstream_path /usr/local/litle-home/tkale/tmp/npm-1220-UQjjVtpG/1508423153445-0.9213839254807681/package/node_modules/ajv/dist/regenerator.min.js
  npm ERR! fstream_type File
  npm ERR! fstream_class FileWriter
  npm ERR! code ENOENT
  npm ERR! errno 34
  npm ERR! fstream_stack /usr/lib/node_modules/fstream/lib/writer.js:284:26
  npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
  npm ERR! 
  npm ERR! Additional logging details can be found in:
  npm ERR!     /usr/local/litle-home/tkale/cvs/scurvyReact/npm-debug.log
  npm ERR! not ok code 0
  </code></pre>
  
  <p>Incase it helps, also find package.json file below:</p>
  
  <pre><code>{
    "name": "React",
    "version": "1.0.0",
    "description": "Building website using React with help of npm and webpack",
    "main": "index.js",
    "scripts": {
      "test": "karma start",
      "start": "node server.js",
      "_comment": "start in the above line tells heroku how to start our app"
    },
    "author": "Tushar",
    "license": "XYZ"
  }
  </code></pre>
  
  <p>Could you please help me solve this issue.</p>