vue运行项目报错 options.proxy should be {Object|Array} (https://webpack.js.org/configuration/dev-server/#d

vue运行报错

INFO Starting development server…
ERROR ValidationError: webpack Dev Server Invalid Options

options.proxy should be {Object|Array} (https://webpack.js.org/configuration/dev-server/#devserverproxy)

ValidationError: webpack Dev Server Invalid Options

options.proxy should be {Object|Array} (https://webpack.js.org/configuration/dev-server/#devserverproxy)

at validateOptions (C:\Users\12139\Desktop\backAdmin\node_modules\_schema-utils@1.0.0@schema-utils\src\validateOptions.js:32:11)
at new Server (C:\Users\12139\Desktop\backAdmin\node_modules\_webpack-dev-server@3.11.2@webpack-dev-server\lib\Server.js:57:5)
at serve (C:\Users\12139\Desktop\backAdmin\node_modules\_@vue_cli-service@4.5.11@@vue\cli-service\lib\commands\serve.js:172:20)
at processTicksAndRejections (internal/process/task_queues.js:93:5)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the admin@0.1.0 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:\Users\12139\AppData\Roaming\npm-cache_logs\2021-03-03T11_24_07_182Z-debug.log
解决办法
检查vue.config.js 中跨域 proxy的配置 将proxy空的配置全部注释掉

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 1024 设计师:白松林 返回首页