question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unknown property 'dev' using "run hot"

See original GitHub issue
{
  "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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17

github_iconTop GitHub Comments

8reactions
silvioiannonecommented, May 7, 2021

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 `webpack-dev-server@v4.0.0-beta`:
    // 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;
    }
});
2reactions
thecrypticacecommented, May 7, 2021

😱😱😱

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:

  1. Upgrade to latest webpack-dev-server release — pinned to exactly a given version.
  2. Fix the config
  3. Verify tests pass
  4. Release new version
Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack options has an unknown property 'hotOnly ...
I am running the command npx webpack-dev-server --mode development in my react application and getting the preceding error. [webpack-cli] ...
Read more >
configuration has an unknown property 'error' · Issue #1142
Invalid configuration object. webpack-dev-server has been initialised using a configuration object that does not match the API schema.
Read more >
options has an unknown property 'public'. these ...
When I attempt to use the "public" option of the "devServer" configuration I get the following error: [webpack-cli] Invalid options object. Dev Server...
Read more >
Setting up the Webpack Dev Server - Three.js Tutorials
You probably have another project started on your PC somewhere using port 8080. Close that project and then try restarting again. Unknown Property...
Read more >
[Solved] Getting Set Up not running - Questions
Dev Server has been initialized using an options object that does not match the API schema. - options has an unknown property 'publicPath'....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found