title: Webpack type error 'TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type boolean (true)'
body: <p>I have been fighting with this for a while now. When I go to run <code>npm run dev</code> I get the error listed below. I can just run <code>webpack -mode dev</code> and it work. It puts the output directly into my dest directory though. Here is the <a href="https://github.com/DavidGumm/simple-router" rel="nofollow noreferrer">GitHub</a> for my project and the <a href="https://github.com/DavidGumm/simple-router.git" rel="nofollow noreferrer">Git Clone Link</a>.
  <br/><br/>
  I am running:<br/>
   - node: v12.16.1<br/>
   - webpack: 4.42.1<br/>
   - webpack-cli: 3.3.11<br/></p>
  
  <p>Error output:</p>
  
  <pre><code>&gt; @ dev %USERPROFILE%\source\repos\simple-router
  &gt; webpack --config webpack.config.dev.js -mode development --display-error-details
  
  %USERPROFILE%\source\repos\simple-router\node_modules\webpack-cli\bin\cli.js:93
                                  throw err;
                                  ^
  
  TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type boolean (true)
      at validateString (internal/validators.js:117:11)
      at Object.isAbsolute (path.js:353:5)
      at module.exports (%USERPROFILE%\source\repos\simple-router\node_modules\webpack-cli\bin\utils\convert-argv.js:34:13)
      at %USERPROFILE%\source\repos\simple-router\node_modules\webpack-cli\bin\cli.js:71:45
      at Object.parse (%USERPROFILE%\source\repos\simple-router\node_modules\yargs\yargs.js:567:18)
      at %USERPROFILE%\source\repos\simple-router\node_modules\webpack-cli\bin\cli.js:49:8
      at Object.&lt;anonymous&gt; (%USERPROFILE%\source\repos\simple-router\node_modules\webpack-cli\bin\cli.js:366:3)
      at Module._compile (internal/modules/cjs/loader.js:1158:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
      at Module.load (internal/modules/cjs/loader.js:1002:32)
      at Function.Module._load (internal/modules/cjs/loader.js:901:14)
      at Module.require (internal/modules/cjs/loader.js:1044:19)
      at require (internal/modules/cjs/helpers.js:77:18)
      at Object.&lt;anonymous&gt; (%USERPROFILE%\source\repos\simple-router\node_modules\webpack\bin\webpack.js:156:2)
      at Module._compile (internal/modules/cjs/loader.js:1158:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
      at Module.load (internal/modules/cjs/loader.js:1002:32)
      at Function.Module._load (internal/modules/cjs/loader.js:901:14)
      at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
      at internal/main/run_main_module.js:18:47 {
    code: 'ERR_INVALID_ARG_TYPE'
  }
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! @ dev: `webpack --config webpack.config.dev.js -mode development --display-error-details`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the @ 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!     %USERPROFILE%\AppData\Roaming\npm-cache\_logs\2020-04-01T18_34_52_621Z-debug.log
  </code></pre>
  
  <p>webpack.config.js</p>
  
  <pre><code>const path = require("path");
  
  module.exports = {
    entry: "./src",
    output: {
      path: path.resolve(__dirname, "dist/js"),
      filename: "simple-router.min.js",
      publicPath: "/js/"
    },
    devtool: "source-map"
  };
  </code></pre>
  
  <p>package.json</p>
  
  <pre><code>{
    "scripts": {
      "test": "echo \"Error: no test specified\" &amp;&amp; exit 1",
      "start": "http-server --proxy http://localhost:8080? --log-ip",
      "build": "webpack --config webpack.config.prod.js -mode  --verbose",
      "dev": "webpack --config webpack.config.dev.js -mode development --display-error-details"
    },
    "devDependencies": {
      "webpack": "^4.42.1",
      "webpack-cli": "^3.3.11"
    },
    "dependencies": {}
  }
  </code></pre>