vue-cli-serve啟動報錯


報錯信息:

> vue-cli-service serve

 INFO  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> (D:\company\unifound\newgit\vue-admin-template\node_modules\_webpack-dev-server@3.11.2@webpack-dev-server\lib\Server.js:135:47)
    at Array.forEach (<anonymous>)
    at new Server (D:\company\unifound\newgit\vue-admin-template\node_modules\_webpack-dev-server@3.11.2@webpack-dev-server\lib\Server.js:134:27)
    at serve (D:\company\unifound\newgit\vue-admin-template\node_modules\_@vue_cli-service@4.4.4@@vue\cli-service\lib\commands\serve.js:172:20)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-admin-template@4.4.0 dev: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-admin-template@4.4.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!     D:\Program Files\node-v12.18.3-win-x64\node_cache\_logs\2021-01-27T03_17_30_205Z-debug.log

原因是vue的配置文件vue.config.js中devServer.proxy地址沒寫


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM