Skip to content

ValidationError: webpack Dev Server Invalid Options - Add liveReload in validation schema. #2158

Closed
@lwxbr

Description

@lwxbr
  • Operating System: Windows 10
  • Node Version: v10.15.0
  • NPM Version: v6.4.1
  • webpack Version: 4.15.1
  • webpack-dev-server Version: 3.1.4
  • Browser: Google Chrome version 75.0.3770.142 64 bits.
  • This is a bug
  • This is a modification request

Code

// vue.config.js
module.exports = {
    devServer: {
      host: '0.0.0.0',
      disableHostCheck: true,
      port: 8080,
      hot: false,
      liveReload: false,
    },
  }

Expected Behavior

The webpack dev server should run without problems.

Actual Behavior

The bug is that the option 'liveReload' option that is not in the schema, so it's triggering this error:

ValidationError: webpack Dev Server Invalid Options

options should NOT have additional properties

    at validateOptions (C:\Users\Lucas\Desktop\seed-view\node_modules\webpack-dev-server\node_modules\schema-utils\src\validateOptions.js:34:11)
    at new Server (C:\Users\Lucas\Desktop\seed-view\node_modules\webpack-dev-server\lib\Server.js:55:3)
    at serve (C:\Users\Lucas\Desktop\seed-view\node_modules\@vue\cli-service\lib\commands\serve.js:137:20)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
error Command failed with exit code 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions