Problem Description
When I was using Node.js and generated the file package.jons
, I found there's a warning at the start:
Problems loading reference 'https://json.schemastore.org/package': Unable to load schema from 'https://json.schemastore.org/package': Failed to establish a socket connection to proxies: ["SOCKS5 127.0.0.1:1090","SOCKS 127.0.0.1:1090"].
Possible Reason
Then I searched the error message Failed to establish a socket connection to proxies
, and found maybe it's a wsl2 proxy problem according to this github reply.
For more precise reason, I searched the VSCode proxy document metioned by the reply, and found maybe it's caused by wrong proxy setting.
Ways to try
According to the VSCode document, I want to try the setting of "Manual proxy address". But I encountered two problems:
- I don't know how to run the command line mentioned in the VSCode document:
--proxy-server=<scheme>=<uri>[:<port>][;...] | <uri>[:<port>] | "direct://"
. - I don't know where to find the file
/etc/resolv.conf
mentioned in the github reply to get the wsl server ip.
Best Answer
When I switch my VPN into global mode and restart VSCode, the warning disappear.