npm proxy
$ npm config get proxy
http://127.0.0.1:25378/
如果你的npm设置了如上代理,那么当请求本地服务时,应该会出现代理错误(通常是502响应):
import { HttpService } from '@nestjs/axios';
@Injectable()
export class ForwardService {
@Inject()
private readonly http: HttpService;
...
await this.http.request(...).toPromise(); // AxiosError: 502
}
- axios 错误 nestjs config proxyaxios错误nestjs config kube kube-config dash-board kube-proxy 功能nodejs config proxy config proxy vite ts 错误axios proxy_next_upstream upstream错误 问题 pkg_config_executable executable pkgconfig错误 dns_probe_finished_bad_config finished错误 responsetype错误issues axios gitconfig错误config users