Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
140
rated 0 times [  144] [ 4]  / answers: 1 / hits: 18095  / 5 Years ago, fri, may 17, 2019, 12:00:00

I am using @vue/cli v3.7.0 and I created a project by vue create myapp with Babel + Router + node-sass and my project got installed successfully



But when I ran npm run serve (in the project directory) I got following error:




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 (C:UsersDellDesktopmyappnode_moduleswebpack-dev-servernode_modulesschema-utilssrcvalidateOptions.js:32:11)
at new Server (C:UsersDellDesktopmyappnode_moduleswebpack-dev-serverlibServer.js:71:5)
at serve (C:UsersDellDesktopmyappnode_modules@vuecli-servicelibcommandsserve.js:138:20)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:757:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersDellAppDataRoamingnpm-cache_logs2019-05-17T19_40_14_984Z-debug.log


I tried npm cache clean -f, reinstallation of VueJS, recreation of project but nothing worked :(



I expect my npm run serve work!


More From » vue.js

 Answers
1

yea this issue just popped up in the last few hours in @vue/cli. I had the same thing in a fresh project. To fix it try this:




  1. Create a file in the root of your project called vue.config.js if you don't already have that file.


  2. Add this to that file:




module.exports = {
devServer: {
clientLogLevel: 'info'
}
};



Then re-run your project. Something happened last night where the clientLogLevel value that comes preset became incorrect.



Here's a thread talking about this issue: GitHub.


[#52106] Sunday, May 12, 2019, 5 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
zachariaho

Total Points: 34
Total Questions: 87
Total Answers: 100

Location: England
Member since Tue, Sep 8, 2020
4 Years ago
;