Skip to content

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

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

Closed
2 tasks done
lwxbr opened this issue Jul 29, 2019 · 2 comments
Closed
2 tasks done

Comments

@lwxbr
Copy link

lwxbr commented Jul 29, 2019

  • 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.
@alexander-akait
Copy link
Member

Update webpack-dev-server version https://github.com/webpack/webpack-dev-server/blob/master/lib/options.json#L183

@lwxbr
Copy link
Author

lwxbr commented Jul 29, 2019

vuejs/vue-cli#4368

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants