-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
项目启动后请求网页地址无响应,迫于 raw.githubusercontent.com 无法访问 #8
Comments
ghost
changed the title
项目启动后页面无法访问,迫于 raw.githubusercontent.com 无法访问
项目启动后请求网页地址无响应,迫于 raw.githubusercontent.com 无法访问
May 23, 2020
ghost
mentioned this issue
May 23, 2020
我把数据json重新上传了一下。 有需要的用下面这段代码直接替换
|
我把数据JSON文件下载到项目本地,改为文件访问,可以解决掉数据访问失败或者慢的问题。改之后的项目地址:https://github.com/fullstack-kingj/gridea-theme-starter.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
前言
由于一些不可描述的原因,在不连接梯子的情况下,raw.githubusercontent.com 无法访问,这导致 starter 项目无法启动。
表现情况
执行
npm run dev
之后,提示UnhandledPromiseRejectionWarning: Error: getaddrinfo ENOENT raw.githubusercontent.com
,请求网页地址无响应下图为部分日志信息
原因分析
查看
app.js
可发现,只有await
后的promise
被resolved
,即axios.get
后面的地址可以正常访问时,才可以res.render
页面解决方案
配置 host
151.101.76.133 raw.githubusercontent.com
使用本地 mock 资源文件
请参考 527c893
The text was updated successfully, but these errors were encountered: