webpack: 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.
- Add some obvious error in your webpack config such as using
modulesDirectories
instead ofmodules
underresolve
. - Ensure you have Node 7.2.1 (latest version as of 12/19/2016).
- run
webpack-dev-server --hot --inline
--colors
and--progress
arguments optional. - See that the error is thrown, but no explanation as to why it throws is given.
- Switch to LTS (6.9.2 as of 12/19/2016) and run the same command.
- 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.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (6 by maintainers)
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.
@chenfanggm you can set your package.json’s webpack version to the git url, and npm will pull the latest code from master.
Interesting, I can’t find anything in the Node.js v7.3.0 changelog about something that could have fixed this. Since no others complained about this, I’m closing this.