New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[6.0.0-beta.14] [webpack-cli] Invalid configuration object. #2633
Comments
|
I think this is a problem with installs using npm 7 installing webpack 4 instead of webpack 5. Can you try |
|
after npm install --legacy-peer-deps I have tried npm run dev and got a question CLI for webpack must be installed. I replied yes and installation fails with error Cannot find module 'webpack-cli/package.json' |
|
adding |
|
I ran into this same problem, and adding |
|
Upgrading to ^5.23.0 worked for me. |
|
The problem for me was old versions of sass and sass-loader which prevented newer versions of webpack to be installed. Remove sass and sass-loader and let mix reinstall them. |
|
In my case, with node v15.11.0 and npm 7.6.3
And |
|
@andymnc's steps above fixed my issues too. But if you are using less you will also need to remove it too:
|
|
Even I was able to solve the issue from what I get via the comments above, I'd like to bring a small explanation for newcomers. In my case, So that when I intend to run After trying a couple of possible fixes which can be found when it's searched with the error topic I got above, I found out only installing webpack as a dependency solves it totally. That means in my case Then you're all good to go and not necessarily install neither |
|
I got the same error while upgrading to laravel 8 (yes i'm late, wanted to update all npm packages too), node v16.13 (LTS), npm v8.1.2
This fixed it but I didn't even had to require webpack in package.json |
Great, It works now. |
|
I've been facing this issue too but thanks to all the helpful replies above, I was able to resolve this swiftly. I had updated the Node and NPM versions to v18.2.0 and 8.9.0 respectively, then updated Laravel Mix from 4.1 to 6.0 when I began to encounter this issue. To resolve the issue, I executed the following commands: npm uninstall sass
npm uninstall sass-loader
rm -rf node_modules
npm install
npm install webpackIt seems webpack isn't being automatically pulled in as a dependency for Laravel Mix, but that has done the trick. Thank you everyone. 👍 |

node -v): v15.3.0npm -v): 7.0.14Description:
I have been using Laravel Mix Version 6 since a few weeks to experiment with Laravel 8, Vue3 and Tailwind (v2 since release). Suddenly from Nov, 17th npm run dev gives the following error:
Steps To Reproduce:
I have made a fresh install of Laravel 8 (Inertia-stack) and installed Tailwind CSS v1. After npm run dev everything worked well. After this I have updated Tailwind CSS to v2 and to get use of PostCSS 8 I have updated Laravel-Mix to 6.0.0-beta.14. This gives the same result
The text was updated successfully, but these errors were encountered: