运行vue项目报错:
Proxy error: Could not proxy request /oss/login from 192.168.1.8:8081 to http://172.10.8.219:8089/cycling. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ETIMEDOUT).
解决方法:
1.找到vue.config.js文件
2. 修改target
proxy: {
'/': {
//target:'http://172.10.8.219:55....',
target: 'http://localhost:8081', **把这里改成本地的地址**
changeOrigin: true,
pathRewrite: {
'^/': '/'
},
timeout: 60000 * 60 * 2 * 2
}