umami 通过yarn build在win10 命令窗口下安装报错
No pending migrations to apply.
✓ Database is up to date.
$ rollup -c rollup.tracker.config.mjs
src/tracker/index.js → public/script.js...
created public/script.js in 1.3s
$ node scripts/build-geo.js
node:events:496
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOENT raw.githubusercontent.com
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:118:26)
Emitted 'error' event on ClientRequest instance at:
at TLSSocket.socketErrorListener (node:_http_client:495:9)
at TLSSocket.emit (node:events:518:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'getaddrinfo',
hostname: 'raw.githubusercontent.com'
}
Node.js v20.11.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "build-geo" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: getaddrinfo ENOENT raw.githubusercontent.com 无法访问
在使用npm安装依赖时,报如下错误:
9895 error compiling from source 9896 error getaddrinfo ENOENT raw.githubusercontent.com 9896 error gifsicle pre-build test failed 9896 error Error: Command failed: C:\Windows\system32\cmd.exe /s /c "autoreconf -ivf" 9896 error 'autoreconf' �����ڲ����ⲿ���Ҳ���ǿ����еij��� 9896 error ���������ļ��� 9896 error 9896 error
原因分析:
无法解析raw.githubusercontent.com地址,需要FQ或者配置本地host文件
解决方法:
查看raw.githubusercontent.com的真实IP地址,打开 https://site.ip138.com/raw.Githubusercontent.com/ 查看下面的IP,复制一个,ping一下看下通不通,不通就用下面其它的ping ,通了才能用。


修改C:\Windows\System32\drivers\etc\hosts,把复制的IP添加进去,保存
|
1 |
|
转自:https://www.cnblogs.com/zsg88/p/17768809.html
将 raw.githubusercontent.com 的 IP 地址指向 185.199.111.133 是 GitHub 的官方 IP 地址之一,这通常是正常且安全的做法,尤其在中国大陆访问 GitHub 时,为了绕过网络限制,有些人会修改 hosts 文件以提高访问速度。不过,如果你怀疑自己可能遭遇了病毒、后门或其他安全问题,以下几点可以帮助你确认:
-
官方来源:
raw.githubusercontent.com的官方 IP 地址通常是固定的,你可以通过 GitHub 的官方文档或工具来确认这一点。GitHub 本身也提供了一个官方的 IP 地址列表,可以通过 GitHub 的 status page 或 DNS 查找工具 来验证。 -
检查 IP 地址:你可以使用命令
nslookup raw.githubusercontent.com来确认它解析出的 IP 地址是否与185.199.111.133相符。确保这一 IP 地址没有被篡改。 -
安全扫描:如果你认为自己下载的文件有潜在的风险,可以使用工具(如 VirusTotal)进行扫描,查看是否存在已知的恶意软件。
-
防火墙和杀毒软件:确保你的防火墙和杀毒软件更新到最新版本,并且能够监测和拦截任何潜在的恶意流量。
-
谨慎下载:如果你通过修改 hosts 文件访问 GitHub 时,确保只下载来自可靠来源的代码和文件,并避免下载来源不明的文件。
如果你没有遇到其他异常情况(例如,文件被篡改,系统出现异常行为等),通常这类修改是安全的。但为了安全起见,你可以回退 hosts 文件,恢复默认设置,看看是否有变化。
