Netlify正在显示我的盖茨比网站的html版本 [英] Netlify is displaying the html version of my Gatsby website

查看:49
本文介绍了Netlify正在显示我的盖茨比网站的html版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

网站版本位于 https://5efbc255ca51be00080b5219--epic-raman-086510 .netlify.app/.看来javascript没有运行,并且仅显示了html版本(假定仅显示在搜索引擎中).

The website build is at https://5efbc255ca51be00080b5219--epic-raman-086510.netlify.app/ . It looks like the javascript isn't running, and only the html version(supposed to only be displayed to search engines) is being displayed.

有点像它可能只是主页. 您可以访问theWebsiteBuildLink/publicationstheWebsiteBuildLink/publications以查看其在其他页面上的作用.

It kinda looks like it might only be the home page. You can visit theWebsiteBuildLink/publications, or theWebsiteBuildLink/publications to see it working for other pages.

我注意到浏览器顶部的标签不确定地显示正在加载的动画

I've noticed the tab at the top of my browser displays a loading animation indefinately

更新

因此,这与图片是广告有关.这些组件在名为ads的文件夹中被命名为AdImg之类的东西.我禁用了adblocker,但是由于某种原因,这个问题一直在发生.我将名称从"Ad"更改为到一个代码字,突然所有内容都加载正确了.

So it had something to do with the images being ads. The components were named things like AdImg and such, and in a folder called ads. I had adblocker disabled but for some reason this problem kept happening. I changed the name away from "Ad" to a code word and suddenly everything loads right.

这仍然是真正令人担忧的,因为无法加载名为广告"的图像,导致我网站上的所有图像均无法加载.任何人都可以回答

It's still really concerning that just because so images named 'Ads' couldn't load, that every image on my website failed loading. Can anyone answer

  1. 为什么即使禁用了adBlocker,ads文件夹中的图像或由ads组件创建的图像也无法正确加载.
  2. 为什么这会导致我的网站上的所有其他图像加载失败

推荐答案

我在控制台中看到以下堆栈跟踪:

I see the following stacktrace in the console:

TypeError: Cannot read property '0' of undefined
    at m (index.js:130)
    at p (index.js:100)

查看它所引用的来源,就好像您有一个带有空图像标签且没有任何参数的页面,即<Img />.

Looking at the source it refers to it looks like you have a page with an empty image tag without any parameters, i.e. <Img />.

错误消息不是很大.我已经向Gatsby提交了拉动请求,至少在以下情况下不会使页面崩溃这发生了.

The error message is not great. I've submitted a pull request to Gatsby that at least doesn't crash the page if this happens.

这篇关于Netlify正在显示我的盖茨比网站的html版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆