Deno: can not visit in china : https://deno.land/std/http/server.ts

Created on 30 Jun 2020  ·  12Comments  ·  Source: denoland/deno

can not run any program, how can i deploy std myself ?

error: error sending request for url (https://deno.land/std/http/server.ts): error trying to connect: tcp connect error: Connection refused (os error 111)

All 12 comments

You can import it from github directly: https://raw.githubusercontent.com/denoland/deno/std/0.59.0/std/http/server.ts

You can import it from github directly: https://raw.githubusercontent.com/denoland/deno/std/0.59.0/std/http/server.ts

raw subdomain banned maybe 5years ago,can not download

Use a VPN like everyone else does in China?

Use a VPN like everyone else does in China?

not ok,vpn not good at commandline,and that is impossible to deploy deno program to servers

We are working on a fix...

@ry

thank you , China has 5 million programmers, nearly 2 million of them use nodejs and are ready to switch to deno, this really a huge problem

Well in china it depends. Diffenrent areas or different ISPs seem to have different implications for the direct accessiblity of deno.land and githubusercontent.com. So some developers around in China don‘t have such a problem. You'd probably use VPN to currently deal with it.

In cmd, it's a good idea to apply the proxy setting to only deno command, using an alias like denop short for "HTTP_PROXY=... HTTPS_PROXY=... deno", if you kind of hate that for the whole environment.

Use a VPN like everyone else does in China?

not ok,vpn not good at commandline,and that is impossible to deploy deno program to servers

If you are using shadowsocks, adding export http_proxy=socks5://address:port and export https_proxy=socks5://address:port to your shell config file will fix this.

一方面, 中国的网络是闭塞的, 如果服务器继续部署在国外, 通过更换服务器网络线路(比如 CN2 GIA)的方法解决这类问题在任何大型项目上都没有先例. 想解决这类问题必须要有国内镜像(比如 cnpm). 受制于政策, 国内镜像的维护是艰难的.

另一方面, 对开发者来说, 这不应该是一个重要的问题.

This issue now has a third-party solution, though I'm sure the Deno team is working on their own solution to this as we speak. Check out issue #6699 (the above)!

@bit-work feel free to contact me if you are unable to import these modules from nest.land/std.

@bit-work

jsdelivr could be the best

jsDelivr is the only public CDN with a valid ICP license issued by the Chinese government, and hundreds of locations directly in Mainland China.

https://www.jsdelivr.com/network

so you can use this

import { serve } from "https://cdn.jsdelivr.net/gh/denoland/deno@std/0.74.0/std/http/server.ts";

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ry picture ry  ·  3Comments

xueqingxiao picture xueqingxiao  ·  3Comments

ry picture ry  ·  3Comments

justjavac picture justjavac  ·  3Comments

benjamingr picture benjamingr  ·  3Comments