Invalid options object. Progress Plugin has been initialized using an options object that does not match the API schema.
Hi All,
I am still using Laravel Mix and up until today it's been working. I updated to the latest today (I run "npm update" and "composer update" daily.
Today I am getting this error when I am running "npm run production".
Does anyone have any ideas what might be conflicting?
➜ application git:(main) npm run production
production
cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js
[webpack-cli] Invalid options object. Progress Plugin has been initialized using an options object that does not match the API schema.
options should be one of these:
object { activeModules?, dependencies?, dependenciesCount?, entries?, handler?, modules?, modulesCount?, percentBy?, profile? } | function
Details:
options has an unknown property 'name'. These properties are valid:
object { activeModules?, dependencies?, dependenciesCount?, entries?, handler?, modules?, modulesCount?, percentBy?, profile? }
-> Options object for the ProgressPlugin.
options has an unknown property 'color'. These properties are valid:
object { activeModules?, dependencies?, dependenciesCount?, entries?, handler?, modules?, modulesCount?, percentBy?, profile? }
-> Options object for the ProgressPlugin.
options has an unknown property 'reporters'. These properties are valid:
object { activeModules?, dependencies?, dependenciesCount?, entries?, handler?, modules?, modulesCount?, percentBy?, profile? }
-> Options object for the ProgressPlugin.
options has an unknown property 'reporter'. These properties are valid:
object { activeModules?, dependencies?, dependenciesCount?, entries?, handler?, modules?, modulesCount?, percentBy?, profile? }
-> Options object for the ProgressPlugin.
Looks like your daily npm update bumped Webpack to a version with stricter schema validation, and now webpackbar is choking because it's passing options that are no longer supported.
The absolute fastest way to unblock your production build is to simply disable the progress bar in your webpack.mix.js file:
mix.options({
progress: false
});
If you really want the progress bar back, nuke your node_modules directory and package-lock.json file, then run a fresh npm install. Running npm update daily can sometimes leave you with a mangled sub-dependency tree between webpack and webpackbar.