{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"hot": "mix watch --hot"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"laravel-mix": "^6.0.18"
},
"dependencies": {
"vue": "^2.6.12"
}
}
Then do npm run hot and I get this:
Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
There's no webpack config and webpack.mix is emtpy.
I've narrowed this down to the webpack-dev-server package version 4.0.0-beta.3.
Same issue.
Can be reproduced with a fresh laravel install followed by npm install
I temporarily fixed it by overriding the Webpack configuration generated by Laravel Mix:
mix.override(config => {
// Apply a workaround caused by Laravel Mix using the `[email protected]`:
// https://github.com/webpack/webpack-dev-server/releases/tag/v4.0.0-beta.3.
// Basically the `dev` property has been deprecated in favor of `devMiddleware`.
if (config.devServer) {
config.devServer.devMiddleware = config.devServer.dev;
delete config.devServer.dev;
}
});
I temporarily fixed it by overriding the Webpack configuration generated by Laravel Mix:
mix.override(config => { // Apply a workaround caused by Laravel Mix using the `[email protected]`: // https://github.com/webpack/webpack-dev-server/releases/tag/v4.0.0-beta.3. // Basically the `dev` property has been deprecated in favor of `devMiddleware`. if (config.devServer) { config.devServer.devMiddleware = config.devServer.dev; delete config.devServer.dev; } });
Great !! thanks :-)
I temporarily fixed it by overriding the Webpack configuration generated by Laravel Mix:
mix.override(config => { // Apply a workaround caused by Laravel Mix using the `[email protected]`: // https://github.com/webpack/webpack-dev-server/releases/tag/v4.0.0-beta.3. // Basically the `dev` property has been deprecated in favor of `devMiddleware`. if (config.devServer) { config.devServer.devMiddleware = config.devServer.dev; delete config.devServer.dev; } });
Omg i wanna kiss you.
Spent 3+ hours on this.. came here to report the bug and noticed the first issue was my issue.
You have no idea.. my sanity thanks you!
😱😱😱
We're gonna have to push out a fix for this and lock the version to a specific beta release (… we're on a beta b/c of webpack 5 support). I didn't realize that ^ would upgrade through different beta versions, apologies. I'll see if I can take care of this today. (a PR would be welcome too!)
Plan:
We've tagged 6.0.19. I opted to pin to beta 2 instead of upgrading to beta 3 as I don't have the time at the moment to properly investigate. This should be good to go now though.
Most helpful comment
I temporarily fixed it by overriding the Webpack configuration generated by Laravel Mix: