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.

New apps fail yarn serve due to invalid webpack dev server options

See original GitHub issue

Version

3.7.0

Environment info


  System:
    OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
  Binaries:
    Node: 11.15.0 - /usr/bin/node
    Yarn: 1.16.0 - /usr/bin/yarn
    npm: 6.9.0 - /usr/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 66.0.5
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-plugin-transform-vue-jsx:  1.0.0 
    @vue/babel-preset-app:  3.7.0 
    @vue/babel-preset-jsx:  1.0.0 
    @vue/babel-sugar-functional-vue:  1.0.0 
    @vue/babel-sugar-inject-h:  1.0.0 
    @vue/babel-sugar-v-model:  1.0.0 
    @vue/babel-sugar-v-on:  1.0.0 
    @vue/cli-overlay:  3.7.0 
    @vue/cli-plugin-babel: ^3.7.0 => 3.7.0 
    @vue/cli-plugin-eslint: ^3.7.0 => 3.7.0 
    @vue/cli-plugin-typescript: ^3.7.0 => 3.7.0 
    @vue/cli-service: ^3.7.0 => 3.7.0 
    @vue/cli-shared-utils:  3.7.0 
    @vue/component-compiler-utils:  2.6.0 
    @vue/eslint-config-standard: ^4.0.0 => 4.0.0 
    @vue/eslint-config-typescript: ^4.0.0 => 4.0.0 
    @vue/preload-webpack-plugin:  1.1.0 
    @vue/web-component-wrapper:  1.2.0 
    eslint-plugin-vue: ^5.0.0 => 5.2.2 (4.7.1)
    typescript: ^3.4.3 => 3.4.5 
    vue: ^2.6.10 => 2.6.10 
    vue-class-component: ^7.0.2 => 7.1.0 
    vue-eslint-parser:  5.0.0 (2.0.3)
    vue-hot-reload-api:  2.3.3 
    vue-loader:  15.7.0 
    vue-property-decorator: ^8.1.0 => 8.1.1 
    vue-router: ^3.0.3 => 3.0.6 
    vue-style-loader:  4.1.2 
    vue-template-compiler: ^2.5.21 => 2.6.10 
    vue-template-es2015-compiler:  1.9.1 
    vuex: ^3.0.1 => 3.1.1 
  npmGlobalPackages:
    @vue/cli: 3.5.5

Steps to reproduce

Install vue-cli as defined in the examples yarn global add @vue/cli vue create demo Select Typescript & Webpack Then run yarn serve

What is expected?

yarn serve works

What is actually happening?

Yarn serve fails for a blank project with

$ yarn serve
yarn run v1.16.0
warning ../package.json: No license field
$ vue-cli-service serve
 INFO  Starting development server...
 ERROR  ValidationError: webpack Dev Server Invalid Options
               
options.clientLogLevel should be {String} and equal to one of the allowed values
               
 [ 'info', 'warn', 'error', 'debug', 'trace', 'silent' ]
               
 (https://webpack.js.org/configuration/dev-server/#devserverclientloglevel)
               
ValidationError: webpack Dev Server Invalid Options

options.clientLogLevel should be {String} and equal to one of the allowed values

 [ 'info', 'warn', 'error', 'debug', 'trace', 'silent' ]

 (https://webpack.js.org/configuration/dev-server/#devserverclientloglevel)

    at validateOptions (/home/user/Dev/demo/node_modules/schema-utils/src/validateOptions.js:32:11)
    at new Server (/home/user/Dev/demo/node_modules/webpack-dev-server/lib/Server.js:71:5)
    at serve (/home/user/Dev/demo/node_modules/@vue/cli-service/lib/commands/serve.js:138:20)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
    at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:56:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:880:11)
    at internal/main/run_main_module.js:21:11
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The same setup worked before on other projects but an update? seems to have broken this. I know at least one other guy in discord with the same error.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
Mo0812commented, May 17, 2019

Had the same issue. To fix it add clientLogLevel: "silent" or clientLogLevel: "warn" in your webpack-dev-server config under vue.config.js for now!

There is a new webpack-dev-server version which changes the names of some log level variables: https://github.com/webpack/webpack-dev-server/commit/7f52bbf

5reactions
gr8dencommented, May 17, 2019

@Mo0812 Thank you

example of vue.config.js. create it in folder of project

module.exports = {
  devServer: {
    clientLogLevel: "warn",
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix "webpack Dev Server Invalid Options" in Vuejs
1. Create vue.config.js in your root directory · 2. Enter the following into it: module.exports = { devServer: { clientLogLevel: 'debug' } }...
Read more >
[webpack-cli] webpack dev server invalid options - You.com
Dev Server has been initialized using an options object ... vuejs/vue-cliNew apps fail yarn serve due to invalid webpack dev server options#4016.
Read more >
CopyWebpackPlugin | webpack
When using yarn workspaces or monorepos , relative copy paths from node_modules can be broken due to the way packages are hoisting. To...
Read more >
webpack-cli - npm
Start using webpack-cli in your project by running `npm i webpack-cli`. ... [options] Run the webpack dev server. version|v [commands.
Read more >
Configure Node.js apps - Azure App Service - Microsoft Learn
Learn how to configure a Node.js app in the native Windows instances, or in a pre-built Linux container, in Azure App Service.
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