Skip to content

Fail when running devServer #6738

@Mister-Hope

Description

@Mister-Hope

Version

5.0.0-beta.5

Reproduction link

just-a-fresh-template-with-clean-install

Environment info

vue: The term 'vue' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

# I am not sure, but which package is providing a vue command? I am not having `@vue/cli` global installed.

Steps to reproduce

Just open the devServer

What is expected?

No error

What is actually happening?

Because webpack-dev-server is validating config(seems starting from 4.1.0), so the project won't work.

 vue-cli-service serve
 INFO  Starting development server...
[1%] setup (initialize)
 ERROR  ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
         - options has an unknown property 'overlay'. These properties are valid:
           object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, magicHtml?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, setupExitSignals?, static?, watchFiles?, webSocketServer? }
ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'overlay'. These properties are valid:
   object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, magicHtml?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, setupExitSignals?, static?, watchFiles?, webSocketServer? }
    at validate (F:\template\vue\node_modules\schema-utils\dist\validate.js:105:11)
    at new Server (F:\template\vue\node_modules\webpack-dev-server\lib\Server.js:31:5)
    at serve (F:\template\vue\node_modules\@vue\cli-service\lib\commands\serve.js:183:20)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
error Command failed with exit code 1.

I have reported this issue in Plan of Vue Cli 5 and the related commit half a month ago, but the newest version still not fixing this.

See 967f948#r56932418 and #6064 (comment)

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