<p dir="auto"><strong>I'm submitting a bug report</strong></p>
<p dir="auto"><strong>Webpack version:</strong><br>
2.1.0-beta.23</p>
<p dir="auto"><strong>Please tell us about your environment:</strong><br>
OSX</p>
<p dir="auto"><strong>Current behavior:</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.entry['something'] should be one of these:
   string | [string]
   The entry point for one output file"><pre class="notranslate"><code class="notranslate">Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.entry['something'] should be one of these:
   string | [string]
   The entry point for one output file
</code></pre></div>
<p dir="auto"><strong>Expected/desired behavior:</strong><br>
Should work since I am actually passing an array of strings as entry point(s)</p>
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br>
Bug</p>


<p dir="auto"><strong>What is the current behavior?</strong><br>
I'm using a module called jquery-datetimepicker in my project. When I install it from the npm repo everything is fine. However, I had to make some changes to it and I tried bundling the local copy. When I load it into the browser I get what appears to be a syntax error saying that a function is not defined.</p>
<p dir="auto"><code class="notranslate">Uncaught TypeError: $(...).datetimepicker is not a function</code></p>
<p dir="auto">To rule out any mistakes on my part, I installed the module from the npm repo, moved it to a different location, then installed it as a local module, but got the same error. This means that identical modules are treated differently depending on how they were installed.</p>
<p dir="auto"><strong>Problems:</strong> There are a number of problems / inconsistencies that I noticed:</p>
<ol dir="auto">
<li>I have to manually go into the local module and install it's dependencies, even though they are already installed in the main project.</li>
<li>After examining the bundle with minimization disabled, I noticed I have 2 jQuery entries</li>
<li>This duplicate jQuery chunk (both the exact same version) seems to be causing the syntax error I mentioned before.</li>
</ol>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto">Download the attached minimal example and follow the steps:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cd test
npm install
webpack
"><pre class="notranslate"><code class="notranslate">cd test
npm install
webpack

</code></pre></div>
<p dir="auto">At this point everything works. Open the html in your browser and click on the fields, you will get the datetimpicker and no errors.</p>
<p dir="auto">Next install as local module:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="mv node_modules/jquery-datetimepicker ~/
npm install --save ~/jquery-datetimepicker
"><pre class="notranslate"><code class="notranslate">mv node_modules/jquery-datetimepicker ~/
npm install --save ~/jquery-datetimepicker

</code></pre></div>
<p dir="auto">At this this point you'll noticed that:</p>
<ol dir="auto">
<li>Package.json now specifies the path to the module</li>
<li>In node_modules, the jquery-datetimepicker module directory is replaced with a link to the actual module location</li>
</ol>
<p dir="auto">If you now try to run webpack, you'll get errors that jquery-datetimepicker is missing dependencies. To get pass that, you would need to:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cd ~/jquery-datetimepicker
nmp install
"><pre class="notranslate"><code class="notranslate">cd ~/jquery-datetimepicker
nmp install

</code></pre></div>
<p dir="auto">After you've done that, you'll be able to run webpack, but the bundle will contain a duplicate jQuery chunk (even if I force the use of the same version of jQuery by modifying jquery-datetimepicker's package.json file) and you'll get the syntax error when you try to render.</p>



<p dir="auto"><strong>What is the expected behavior?</strong><br>
I would expect the module to be resolved the same way regardless of it's location.</p>
<ul dir="auto">
<li>I should not have to install the jquery-datetimepicker dependencies by hand.<br>
If I understand the resolve behavior, it should go abc/node_modules/jquery-datetimepicker/node_modules. When it doesn't find that it should try abc/node_modules where it should be able to find everything it needs.</li>
<li>I should get only a single jQuery chunk</li>
<li>I should not be getting a syntax error.</li>
</ul>
<p dir="auto">I manually removed the duplicate jQuery chunk and fixed the dependency IDs, and that seems to fix the problem. Not sure why, as far as I can tell there is no syntax error in the file, but it could be some sort of chunk ordering issue.</p>
<p dir="auto"><strong>If this is a feature request, what is motivation or use case for changing the behavior?</strong></p>
<p dir="auto"><strong>Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.</strong></p>
<p dir="auto">Here is the system info:<br>
<a href="https://github.com/webpack/webpack/files/9084782/system_info.txt">system_info.txt</a></p>
<p dir="auto">Minimal example:</p>
<p dir="auto"><a href="https://github.com/webpack/webpack/files/9085573/test.zip">test.zip</a></p>