title: How to fix : Cannot find module 'webpack/bin/config-yargs'
body: <p>I've running <code>npm run dev</code> command to run my react app. BUT then it pops up this <code>Error: Cannot find module 'webpack/bin/config-yargs'</code>. I've googled this error. Many people who solve this error tell me to install webpack and webpack-cli. Therefore, I went to install webpack and webpack-cli. However, the error still pops up. PLEASE HELP!</p>
  
  <p>I've tried several solution, such as this
  <a href="https://stackoverflow.com/questions/40379139/cannot-find-module-webpack-bin-config-yargs">Cannot find module &#39;webpack/bin/config-yargs&#39;</a>
  and this
  <a href="https://stackoverflow.com/questions/51799669/how-to-solve-cannot-find-module-webpack-cli-bin-config-yargs-error-in-reactjs">How to solve &#39;Cannot find module &#39;webpack-cli/bin/config-yargs&#39; error in reactjs?</a>
  NOW I've installed webpack and webpack-cli.</p>
  
  <p>My cmd</p>
  
  <pre><code>C:\Users\ASUS\Desktop\truffle-webpack-ipfs-bootstrap-master\truffle-webpack-ipfs-bootstrap-master&gt;npm run dev
  
  &gt; truffle-init-webpack@0.0.2 dev C:\Users\ASUS\Desktop\truffle-webpack-ipfs-bootstrap-master\truffle-webpack-ipfs-bootstrap-master
  &gt; webpack-dev-server
  
  internal/modules/cjs/loader.js:613
      throw err;
      ^
  
  Error: Cannot find module 'webpack/bin/config-yargs'
  Require stack:
  - C:\Users\ASUS\Desktop\truffle-webpack-ipfs-bootstrap-master\truffle-webpack-ipfs-bootstrap-master\node_modules\webpack-dev-server\bin\webpack-dev-server.js
      at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15)
      at Function.Module._load (internal/modules/cjs/loader.js:526:27)
      at Module.require (internal/modules/cjs/loader.js:666:19)
      at require (internal/modules/cjs/helpers.js:16:16)
      at Object.&lt;anonymous&gt; (C:\Users\ASUS\Desktop\truffle-webpack-ipfs-bootstrap-master\truffle-webpack-ipfs-bootstrap-master\node_modules\webpack-dev-server\bin\webpack-dev-server.js:54:1)
      at Module._compile (internal/modules/cjs/loader.js:759:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
      at Module.load (internal/modules/cjs/loader.js:628:32)
      at Function.Module._load (internal/modules/cjs/loader.js:555:12)
      at Function.Module.runMain (internal/modules/cjs/loader.js:824:10)
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! truffle-init-webpack@0.0.2 dev: `webpack-dev-server`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the truffle-init-webpack@0.0.2 dev script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\ASUS\AppData\Roaming\npm-cache\_logs\2019-08-30T09_10_59_739Z-debug.log
  </code></pre>
  
  <p>My package.json</p>
  
  <pre><code>{
    "name": "truffle-init-webpack",
    "version": "0.0.2",
    "description": "Frontend example using truffle v3",
    "scripts": {
      "lint": "eslint ./",
      "build": "webpack",
      "dev": "webpack-dev-server"
    },
    "author": "Douglas von Kohorn",
    "license": "MIT",
    "devDependencies": {
      "babel-cli": "^6.22.2",
      "babel-core": "^6.26.3",
      "babel-eslint": "^6.1.2",
      "babel-loader": "^6.2.10",
      "babel-plugin-transform-runtime": "^6.22.0",
      "babel-preset-env": "^1.7.0",
      "babel-preset-es2015": "^6.22.0",
      "babel-register": "^6.22.0",
      "copy-webpack-plugin": "^4.6.0",
      "css-loader": "^3.2.0",
      "eslint": "^3.14.0",
      "eslint-config-standard": "^6.0.0",
      "eslint-plugin-babel": "^4.0.0",
      "eslint-plugin-mocha": "^4.8.0",
      "eslint-plugin-promise": "^3.8.0",
      "eslint-plugin-standard": "^2.0.0",
      "html-webpack-plugin": "^2.28.0",
      "json-loader": "^0.5.4",
      "style-loader": "^0.13.1",
      "truffle-contract": "^1.1.11",
      "web3": "^0.20.7",
      "webpack": "^4.0.0",
      "webpack-cli": "^3.3.7",
      "webpack-dev-server": "^2.11.5"
    },
    "dependencies": {
      "ajv": "^5.5.2",
      "boostrap": "^2.0.0",
      "bootstrap": "^4.3.1",
      "ipfs-api": "^19.0.0",
      "jquery": "^3.4.1",
      "node-sass": "^4.8.3",
      "popper.js": "^1.15.0",
      "postcss-loader": "^2.1.6",
      "precss": "^3.1.2",
      "sass-loader": "^6.0.7"
    }
  }
  </code></pre>