错误信息表明,Vite 在尝试配置 HTTP 代理时,未能获得一个有效的目标 URL。这通常是因为在 vite.config.js(或 vite.config.ts,取决于你的项目使用 JavaScript 还是 TypeScript)文件中,代理配置不正确。 检查Vite 配置文件中关于 HTTP 代理的设置: 打开你的 vite.config.js 文件,查找与代理相关的配置。通常,这部分...
Description Resolves this issue #10507 Additional context Improves proxy error message. Now displays something like this which is helpful for debugging: 6:23:26 PM [vite] http proxy error at /some-path: Error: getaddrinfo ENOTFOUND somedomain.com at
feat(proxy): Include URL of request in proxy errors (#10508) Browse files main (#10508) v6.0.3 … create-vite@3.2.0 fc authored Oct 19, 2022 Verified 1 parent 8d0a9c1 commit 27e2832 Showing 1 changed file with 3 additions and 1 deletion. Whitespace Ignore whitespace Spli...
@@ -52,7 +52,9 @@ export function proxyMiddleware( const res = originalRes as http.ServerResponse | net.Socket if ('req' in res) { config.logger.error( `${colors.red(`http proxy error:`)}\n${err.stack}`, `${colors.red(`http proxy error at ${originalRes.req.url}:`)}\n$...