laravel-mix: unknown property 'dev' using "run hot"
{
"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.
- configuration has an unknown property ‘dev’. These properties are valid: object { bonjour?, client?, compress?, devMiddleware?, firewall?, headers?, historyApiFallback?, host?, hot?, http2?, https?, liveReload?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, public?, setupExitSignals?, static?, transportMode?, watchFiles? }
There’s no webpack config and webpack.mix is emtpy.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17
I temporarily fixed it by overriding the Webpack configuration generated by Laravel Mix:
😱😱😱
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:
Anyone know how to fix this error when you try to use ‘npm run hot’? Thanks.
[webpack-cli] Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
Okay, thanks. I’ll spend some time tonight on it so we can bump it.
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.
I’ve narrowed this down to the
webpack-dev-serverpackage version4.0.0-beta.3.