掉坑日记01When `proxy` in package.json is an object, each `context` object must have a `target` property

When proxy in package.json is an object, each context object must have a target property specified as a url string

		PS C:\Users\T440P\Desktop\wang_zzzspark\uip-frontend> npm run serve

> vue-antd-project@1.0.0 serve C:\Users\T440P\Desktop\wang_zzzspark\uip-frontend

 INFO  Starting development server...
When `proxy` in package.json is an object, each `context` object must have a `target` property specified as a url string
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-antd-project@1.0.0 serve: `vue-cli-service serve --open`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-antd-project@1.0.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\T440P\AppData\Roaming\npm-cache\_logs\2021-01-11T00_49_23_552Z-debug.log

今天早上启动项目的时候,发现了这样的报错,习惯以为是项目多了新的安装包,但是 npm install 之后还是看错,细细一看报错是再vue.config.js里的proxy ,发现了自己的一个代理端口没开
掉坑日记01When `proxy` in package.json is an object, each `context` object must have a `target` property_第1张图片
打开一行target就好了。

你可能感兴趣的:(掉坑日记01When `proxy` in package.json is an object, each `context` object must have a `target` property)