title: ERROR in multi ./main.js . Module not found: Error: Can't resolve '/home/user/workspace/webpack'
body: <p>I am facing issues while bundling 2 independent javascript files.</p>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;experiment&lt;/title&gt;
  &lt;script src="main.js"&gt;&lt;/script&gt;
  &lt;script src="new.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form&gt;
  &lt;button onclick="firstButton();"&gt;firstButton&lt;/button&gt;
  &lt;button onclick="secondButton();"&gt;secondtButton&lt;/button&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>main.js</strong></p>
  
  <pre><code>function firstButton() {
  
  console.log("First Button");    
  }
  </code></pre>
  
  <p><strong>new.js</strong></p>
  
  <pre><code>function secondButton(){
      alert("Second Button");
  }
  </code></pre>
  
  <p><strong>webpack.config.js</strong></p>
  
  <pre><code>module.exports = {
    entry: './main.js',
    output: {
      filename: './bundle.js'
    }
  };
  </code></pre>
  
  <p>when running <strong>webpack .</strong> command then getting this error on terminal</p>
  
  <pre><code>Hash: 8a3cc31d526703c3b9fa
  Version: webpack 2.5.1
  Time: 88ms
        Asset     Size  Chunks             Chunk Names
  ./bundle.js  2.91 kB       0  [emitted]  main
     [0] ./main.js 57 bytes {0} [built]
     [1] multi ./main.js . 40 bytes {0} [built]
  
  ERROR in multi ./main.js .
  Module not found: Error: Can't resolve '/home/user/workspace/webpack' in '/home/user/workspace/webpack'
   @ multi ./main.js .
  </code></pre>
  
  <p>also i tried this <strong>webpack.config.js</strong></p>
  
  <pre><code>const config = {
    entry: {
      a : './main.js' ,
      b : './new.js'
    } ,
     output: {
      filename: 'bundle.js',
      path: '/home/user/workspace/webpack'
    }
  };
  
  module.exports = config;
  </code></pre>
  
  <p>this is the error i am getting ..</p>
  
  <pre><code>user@user-ThinkPad-T420s:~/workspace/webpack$ webpack .
  Hash: 44a14163f4c0c760c3ad
  Version: webpack 2.5.1
  Time: 89ms
      Asset     Size  Chunks             Chunk Names
  bundle.js  2.69 kB       0  [emitted]  b
     [0] ./main.js 57 bytes {1} [built]
     [1] ./new.js 51 bytes {0} [built]
  
  ERROR in Entry module not found: Error: Can't resolve '/home/user/workspace/webpack' in '/home/user/workspace/webpack'
  
  ERROR in chunk a [entry]
  bundle.js
  Conflict: Multiple assets emit to the same filename bundle.js
  </code></pre>