访问时,控制台报错Proxy error: Could not proxy request /api/dashboard/chart?ID=12345 from localhost:8080 to http://localhost:3000/. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED). 使用仓库项目,定位到tag0.0.9,启动不报错,后来将vue.config.js和Analysis.vue改为仓库的代码,还是报错,参照评论,将proxy的target的端口由3000改为8080,无报错,但此疑问始终存在,为什么会报上述错误,而且不止一人报错,希望老师能真的给个解答
报错 Proxy error: Could not proxy request /api/dashboard/chart?ID=12345 from localhost:8080 to http://localhost:8080/. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).
报错 Proxy error: Could not proxy request /api/dashboard/chart?ID=12345 from localhost:8080 to http://localhost:8080/. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).
我的可以请求成功,但是终端还会报这个错,这是怎么回事呢? TypeError: Cannot read property 'split' of undefined at Object.bypass (G:\vue\vuex-demo\vue.config.js:13:15) at app.use (G:\vue\vuex-demo\node_modules\webpack-dev-server\lib\Server.js:313:25)
老师,我用axios请求我本地的搭建的php脚本,有ajax跨域问题!!因为我用npm run serve启动的是127.0.0.1:8080端口,我php服务器是127.0.0.1:80端口 测试阶段只能用Mock数据吗?是不是要打包后运行web服务才可以?而且在开发环境下我用手机也访问页面 我是新手没有开发经验,问题太多了老是麻烦老师都不好意思了
前面找不到mock是路径有问题解决了,又出现代理不能到3000端口 Proxy error: Could not proxy request /api/dashboard/chart?ID=12345 from 127.0.0.1:8080 to http://localhost:3000/. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).