经过调查是vue.config.js中的proxy写的有问题,修复proxy写法之后问题消失
Starting development server...
10% building 2/2 modules 0 active ERROR TypeError: Cannot read property 'upgrade' of undefined
TypeError: Cannot read property 'upgrade' of undefined
at Server.<anonymous> (F:\project\neuproject\imes-vue\node_modules\webpack-dev-server\lib\Server.js:135:47)
at Array.forEach (<anonymous>)
at new Server (F:\project\neuproject\imes-vue\node_modules\webpack-dev-server\lib\Server.js:134:27)
at serve (F:\project\neuproject\imes-vue\node_modules\@vue\cli-service\lib\commands\serve.js:140:20)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at findNodeScript.then.existing (D:\Users\linzhuqing\AppData\Roaming\nvm\v10.10.0\node_modules\npm\node_modules\libnpx\index.js:268:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-project@0.1.0 serve: `npx --max_old_space_size=4096 vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-project@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\linzhuqing\AppData\Roaming\npm-cache\_logs\2020-03-17T04_10_00_368Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-project@0.1.0 dev: `npm run serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-project@0.1.0 dev 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\linzhuqing\AppData\Roaming\npm-cache\_logs\2020-03-17T04_10_00_404Z-debug.log