question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:

  1. npm install laravel-mix --save-dev
  2. Add NPM scripts
  3. touch webpack.mix.js
  4. npm run production

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:13
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

12reactions
Lorempn2commented, Oct 17, 2017

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"

8reactions
JeffreyWaycommented, Oct 17, 2017

Fixed in bdc93507e19809602337e3a30da11bf880e86c7a

Tagged as 1.5.1, so you can do npm laravel-mix.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found