WebpackOptionsValidationError does not throw correctly on Node 7.2.1 (webpack 2.2.0-rc.1)

Webpack 2.2.0-rc.1 has an error messaging bug.

Current behavior is throwing an error, but it does not display where the error comes from, nor does it display the recommended fixes.

  1. Add some obvious error in your webpack config such as using modulesDirectories instead of modules under resolve.
  2. Ensure you have Node 7.2.1 (latest version as of 12/19/2016).
  3. run webpack-dev-server --hot --inline --colors and --progress arguments optional.
  4. See that the error is thrown, but no explanation as to why it throws is given.
  5. Switch to LTS (6.9.2 as of 12/19/2016) and run the same command.
  6. See the error being thrown, but now we have a description of what the error is.

The expected behavior is that it should only ouput the error in the CLI, rather than leveraging Node’s internal error messaging.

Tested on OS X 10.11.6, Node 7.2.1 & Node 6.9.2, and using iTerm2 emulator.

Author: Fantashit

1 thought on “WebpackOptionsValidationError does not throw correctly on Node 7.2.1 (webpack 2.2.0-rc.1)

  1. I have this same bug under node v7.3.0 & v7.4.0 (have not tested other 7.x versions) with webpack v2.2.0-rc3

    It does work on the latest(v6.9.3) LTS version however.

Comments are closed.