npm run dev 报错: ValidationError: Invalid options object,删除node_modules重新安装后,还是同样的错误

发布于 2023-06-13 16:32:02

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 'disableHostCheck'. 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?, server?, setupExitSignals?, setupMiddlewares?, 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 'disableHostCheck'. 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?, server?, setupExitSignals?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }
    at validate (C:UsersTalweixin_4cdjango-vue-adminwebnode_moduleswebpack-dev-servernode_modulesschema-utilsdistvalidate.js:133:11)
    at new Server (C:UsersTalweixin_4cdjango-vue-adminwebnode_moduleswebpack-dev-serverlibServer.js:270:5)
    at serve (C:UsersTalweixin_4cdjango-vue-adminwebnode_modules@vuecli-servicelibcommandsserve.js:194:20)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

查看更多

关注者
0
被浏览
1.3k
0 个回答
暂无答案,快来添加答案吧

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览