xcatliu / pagic

A static site generator powered by Deno + React
https://pagic.org
MIT License
1.65k stars 103 forks source link

Uncaught Http: error sending request for url: pillarjs... #23

Closed hylerrix closed 4 years ago

hylerrix commented 4 years ago

在给 deno-tutorail 安装 pagic 的过程中,遇到了如下报错。这可能不是 pagic 的问题,但是我代理也开了,浏览器直接访问 https://raw.githubusercontent.com/pillarjs/path-to-regexp/v6.1.0/src/index.ts 也能获取内容,为什么会报错捏?

所以提问在这里,看看大佬们有啥好的建议没~

$ deno install --unstable --allow-read --allow-write --allow-net https://deno.land/x/pagic/mod.ts

Download https://deno.land/x/pagic/mod.ts
Compile https://deno.land/x/pagic/mod.ts
Download https://deno.land/x/pagic/src/Pagic.ts
...
Download https://deno.land/x/media_types@v2.3.5/mod.ts
Download https://raw.githubusercontent.com/pillarjs/path-to-regexp/v6.1.0/src/index.ts
error: Uncaught Http: error sending request for url (https://raw.githubusercontent.com/pillarjs/path-to-regexp/v6.1.0/src/index.ts): error trying to connect: tcp connect error: Connection refused (os error 61)
    at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11)
    at Object.sendAsync ($deno$/ops/dispatch_json.ts:98:10)
    at async processImports ($deno$/compiler.ts:736:23)
    at async processImports ($deno$/compiler.ts:753:7)
    at async processImports ($deno$/compiler.ts:753:7)
    at async processImports ($deno$/compiler.ts:753:7)
    at async processImports ($deno$/compiler.ts:753:7)
    at async processImports ($deno$/compiler.ts:753:7)
    at async processImports ($deno$/compiler.ts:753:7)
    at async processImports ($deno$/compiler.ts:753:7)

根据我目前的水平进行了 curl 测试,报错如下:

curl -fsSL https://raw.githubusercontent.com/pillarjs/path-to-regexp/v6.1.0/src/index.ts
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

目前还没搜到相关解决方案..


加了 hosts 成功了 🤡 hosts 199.232.68.133 raw.githubusercontent.com