1234567
# npmnpm config set http=http://localhost://50321npm config set https-proxy=http://localhost://50321# yarnyarn config set http=http://localhost://50321yarn config set https-proxy=http://localhost://50321
因为,npm 默认的 registry 是 https://registry.npmjs.org,所以第二条设置才是有效的。