本文仅写了 macOS 下的实践, 其他系统可参照修改。
通过 homebrew 安装 imagesnap:
brew install imagesnap| # 规则配置仅供参考,适用于 Surge iOS & Mac; | |
| # 包含 Reject 规则,用于拦截广告、行为分析、数据统计 | |
| # 屏蔽部分运营商劫持网页弹出流量统计 | |
| # 部分特性可能仅适用于最新的 TestFlight 版本 | |
| [General] | |
| # warning, notify, info, verbose | |
| loglevel = notify | |
| ipv6 = true | |
| skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local |
If you just want to fix the issue quickly, scroll down to the "solution" section below.
If you're a Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you may see an error like this:
$ npm update npm -g