Netlify is displaying the html version of my Gatsby website

给你一囗甜甜゛ 提交于 2020-07-08 10:23:46

问题


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.

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


Update

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. Why images in an ads folder, or created by an ads component were not loading properly, even with adBlocker disabled.
  2. Why this caused every other image on my website to fail loading

回答1:


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)

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 />.

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.



来源:https://stackoverflow.com/questions/62616962/netlify-is-displaying-the-html-version-of-my-gatsby-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!