Try doing a full reset
rm -rf node_modules
rm package-lock.json yarn.lock
npm cache clear --force
npm install
And then run
npm run dev
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Laravel 7 after install composer require laravel/ui:^2.4 and php artisan ui vue then npm run dev give error required webpack-cli when install give error
➜ npm run dev
dev npm run development
development cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js
CLI for webpack must be installed. webpack-cli (https://github.com/webpack/webpack-cli)
We will use "npm" to install the CLI via "npm install -D". Do you want to install 'webpack-cli' (yes/no): yes Installing 'webpack-cli' (running 'npm install -D webpack-cli')...
added 33 packages, and audited 1172 packages in 5s
57 packages are looking for funding
run npm fund for details
3 high severity vulnerabilities
To address all issues (including breaking changes), run: npm audit fix --force
Run npm audit for details.
[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
then
npm run dev
dev npm run development
development cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js
[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
Please or to participate in this conversation.