Issue 1:
I'm submitting a bug report

Webpack version:

2.1.0-beta.23

Please tell us about your environment:

OSX

Current behavior:

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

Expected/desired behavior:

Should work since I am actually passing an array of strings as entry point(s)

Issue 2:
Do you want to request a feature or report a bug?

Bug

What is the current behavior?

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.

Uncaught TypeError: $(...).datetimepicker is not a function

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.

Problems: There are a number of problems / inconsistencies that I noticed:

I have to manually go into the local module and install it's dependencies, even though they are already installed in the main project.

After examining the bundle with minimization disabled, I noticed I have 2 jQuery entries

This duplicate jQuery chunk (both the exact same version) seems to be causing the syntax error I mentioned before.

If the current behavior is a bug, please provide the steps to reproduce.

Download the attached minimal example and follow the steps:

cd test
npm install
webpack

At this point everything works. Open the html in your browser and click on the fields, you will get the datetimpicker and no errors.

Next install as local module:

mv node_modules/jquery-datetimepicker ~/
npm install --save ~/jquery-datetimepicker

At this this point you'll noticed that:

Package.json now specifies the path to the module

In node_modules, the jquery-datetimepicker module directory is replaced with a link to the actual module location

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:

cd ~/jquery-datetimepicker
nmp install

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.

What is the expected behavior?

I would expect the module to be resolved the same way regardless of it's location.

I should not have to install the jquery-datetimepicker dependencies by hand.

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.

I should get only a single jQuery chunk

I should not be getting a syntax error.

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.

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.

Here is the system info:

system_info.txt

Minimal example:

test.zip