当我使用Node.js并生成文件
package.jons
时,我发现开头有一个警告:
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"].
然后我搜索了错误信息
Failed to establish a socket connection to proxies
,根据这个github回复发现可能是wsl2代理问题。
为了更准确的原因,我搜索了回复中提到的VSCode代理文档,发现可能是代理设置错误导致的。
根据VSCode文档,我想尝试“手动代理地址”的设置。但我遇到了两个问题:
--proxy-server=<scheme>=<uri>[:<port>][;...] | <uri>[:<port>] | "direct://"
。/etc/resolv.conf
获取wsl服务器ip。