Problem with webpack v3.8.0
See original GitHub issue- Laravel Mix Version: 1.5.0
- Node Version: v6.11.4
- NPM Version: 3.10.10
- OS: macOS Sierra 10.12.6 (16G29)
Description:
An hour ago webpack v3.8.0 was released, with the following bugfix: fix schema for stats and be more strict
. When running npm run production
I get this error:
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.stats should be one of these:
object { context?, hash?, version?, timings?, assets?, env?, colors?, maxModules?, chunks?, chunkModules?, modules?, children?, cached?, cachedAssets?, reasons?, source?, warningsFilter?, excludeAssets?, excludeModules?, exclude?, entrypoints?, errorDetails?, chunkOrigins?, modulesSort?, moduleTrace?, chunksSort?, assetsSort?, publicPath?, providedExports?, usedExports?, optimizationBailout? } | boolean | "none" | "errors-only" | "minimal" | "normal" | "detailed" | "verbose"
Used by the webpack CLI program to pass stats options.
Details:
* configuration.stats has an unknown property 'errors'. These properties are valid:
object { context?, hash?, version?, timings?, assets?, env?, colors?, maxModules?, chunks?, chunkModules?, modules?, children?, cached?, cachedAssets?, reasons?, source?, warningsFilter?, excludeAssets?, excludeModules?, exclude?, entrypoints?, errorDetails?, chunkOrigins?, modulesSort?, moduleTrace?, chunksSort?, assetsSort?, publicPath?, providedExports?, usedExports?, optimizationBailout? }
* configuration.stats has an unknown property 'warnings'. These properties are valid:
object { context?, hash?, version?, timings?, assets?, env?, colors?, maxModules?, chunks?, chunkModules?, modules?, children?, cached?, cachedAssets?, reasons?, source?, warningsFilter?, excludeAssets?, excludeModules?, exclude?, entrypoints?, errorDetails?, chunkOrigins?, modulesSort?, moduleTrace?, chunksSort?, assetsSort?, publicPath?, providedExports?, usedExports?, optimizationBailout? }
* configuration.stats should be a boolean.
* configuration.stats should be one of these:
"none" | "errors-only" | "minimal" | "normal" | "detailed" | "verbose"
This is fixed by removing the errors
and warnings
properties in src/builder/webpack-default.js
. For now I fixed the issue by adding the following dependency to my own package.json
file:
"webpack": "3.5.0",
Steps To Reproduce:
npm install laravel-mix --save-dev
- Add NPM scripts
touch webpack.mix.js
npm run production
Issue Analytics
- State:
- Created 6 years ago
- Reactions:13
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Problem with webpack v3.8.0 #1279 - laravel-mix ... - GitHub
An hour ago webpack v3.8.0 was released, with the following bugfix: fix schema for stats and be more strict . When running npm...
Read more >How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >Webpack 3 - Module not found: Error: Can't resolve ' '
After updating to a new webpack (from 1 to 3), the following error occurs with all aliases (with webpack --display-error-details :
Read more >webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Webpack - npm
Introduction. Webpack is a bundler for modules. The main purpose is to bundle JavaScript files for usage in a browser, yet it is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hardcoding webpack in your own package.json to a version lower than 3.8.0 is the fix for now, for example:
"webpack": "3.7.0"
Fixed in bdc93507e19809602337e3a30da11bf880e86c7a
Tagged as 1.5.1, so you can do
npm laravel-mix
.