gatsby-plugin-robots-txt | Based on mdreizin/gatsby-plugin-robots-txt
kandi X-RAY | gatsby-plugin-robots-txt Summary
kandi X-RAY | gatsby-plugin-robots-txt Summary
Based on mdreizin/gatsby-plugin-robots-txt. Added options to fetch data from a GraphQL query and append it to the list of disallowed URLs.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Run on build
- Write data to a file
- Run a callback
gatsby-plugin-robots-txt Key Features
gatsby-plugin-robots-txt Examples and Code Snippets
Community Discussions
Trending Discussions on gatsby-plugin-robots-txt
QUESTION
"gatsby develop" works well. However, an error occurs in 'gatsby build'
...ANSWER
Answered 2022-Mar-30 at 05:45Summarizing a lot gatsby develop
is interpreted by the browser while gatsby build
is compiled in the Node server (your machine or your deploy server) so the behavior of your code is slightly different. Especially to what's related to global objects and SSR (Server-Side Rendering). The fact that your code works under gatsby develop
means that is working under certain specific conditions, not that your code works always or has no errors, this should be inferred if it succeeds in a gatsby build
.
In your case, it seems that the posts
data is undefined
when using memoized hook (useMemo
), at least, in the initial render.
Try using:
QUESTION
ANSWER
Answered 2022-Feb-14 at 19:18CSS modules in Gatsby v3 onwards needs to be imported as ES modules, so your:
QUESTION
I'm migrating my site from gatsby 2 to version 4. It runs perfectly with the gatsby develop
. However, when I run gatsby build
, I got the following error
ANSWER
Answered 2022-Jan-30 at 18:28After some debugging, the issue seems to be related to the Contentful source plugin (gatsby-source-contentful
) according to some GitHub threads and to the capability to create internal IDs for tag
node (tags___NODE
).
Aside of waiting the resolution you can try updating the plugin to the latest version.
QUESTION
I am trying to build in my production environment (i using GitHub actions to do the deploy), but the wrong is what the node is not the same between in my local
in my local i have this version:
...ANSWER
Answered 2021-Oct-01 at 04:43but i dont know what is the node version on github actions i can not reproduce the error in my local, because of the version are not the same
You could use setup-node
action to make the version exactly same with your local:
QUESTION
I have run gatsby clean
before npm run develop
but still it has not made a difference...
My gatsby-node.js file has been looked at by others who are familiar with the Gatsby framework, and they're not sure what the problem is either...
Here is my gatsby-node.js file:
...ANSWER
Answered 2021-Sep-30 at 07:58Try running gatsby clean first, and then try it again…
QUESTION
The site loses all functionalities after building it. In develop mode everything works fine, but when I build the website it looks like all scripts are missing. Bootstrap (Carousel DropDowns) are not responding, leflet map and background image not loading and react-multi-carousel do not work. I don't see any errors in the browser console, of course I ran gatsby clean
before building. I uploaded the project to netlify. Below I am enclosing the json package:
ANSWER
Answered 2021-Apr-13 at 20:59There's not much debug in the question however, to me, it seems that you are using some dependencies outside React's scope, which may potentially block React's hydration process, which may explain the problem described. For example, using Leaflet instead of React's Leaflet or (depending on its implementation) Bootstrap instead of React's Boostrap.
You should be able to change all React-unfriendly modules to React's ones without too much effort and that should fix your problems.
Keep in mind that if your project "work in develop
and breaks in build
" doesn't mean that your project work or stops working, it just means that is working under certain and specific circumstances. Basically, and summarizing (to avoid extending the answer), gatsby develop
uses the browser as an interpreter, where there are, among other things, global objects like window
or document
. However, gatsby build
occurs in the Node server, where at the build time, there are not global objects because there are not even created yet, that the main reason why you may face a different behavior between both scenarios but doesn't mean that the project stopped working magically.
You can read further details in the Overview of Gatsby Build Process.
Another option, linked with blocking React's hydration, is that some component may be blocking that process because of its own behavior. Be careful when using global objects like window
or document
(or when importing modules that uses it), they use should be always be wrapped inside the following condition, as you can see from the docs:
When referencing window in a React component.
QUESTION
I have a Gatsby site that has been running smoothly for 3 months online. As of Friday 24th July I have started to receive the below result and users only see a blank screen.
...ANSWER
Answered 2020-Dec-14 at 05:47What did you try so far? As @ksav pointed out, in this GitHub thread there are a several ways to fix a similar issue:
- Removing
node_modules
,.cache
and install again - Removing
node_modules
,.cache
fix Gatsby tov2.23.3
/upgrade up to^2.26.1
where the bug is fixed and install again
It seems related to a loading staticQuery bug that can't be reproduced in a fresh install. The final trial is to remove your package-lock
/yarn-lock.json
and generate it again.
QUESTION
I am using gatsby. All was working fine recently until I ran npm update
as I wanted to ensure I was up to date. Since then I am getting white pages I navigate to with this error
I believe this error is only occurring as the page is not loading and is not the root cause. I am looking to correct the root cause of the page not loading.
Looking around it seemed like this could be a service worker problem So I removed the service works as per gatsby guides but no luck.
The error only occurs when navigating to a page, for example
...ANSWER
Answered 2020-Jun-09 at 15:22Smoking Gun was a plugin I was using
"embla-carousel" "embla-carousel-react"
Rolled them back and issues went away, raising an issue on github for the team
QUESTION
I am revamping a blog to Gatsby which is lightning fast, everything seems perfect but I am facing different sort of issue, as the images I have via Netlify CMS aren't appearing properly in the blog, the images are appearing blur. I don't know what is going wrong here.
Here is the example of the problem statement
here is the excerpt of my gatsby-config.js.
...ANSWER
Answered 2020-Mar-24 at 06:16I am more interested in how do you call those images in your components rather than in the package.json
(it doesn't seem a dependencies issue) because inspecting the code, it seems that you've added the /static
path which is not required. As it is shown in the following screenshot:
Regarding the updates coming from the comments below, we've figured out that the issue is related directly to this GitHub issue where apparently images retrieved by a markdown are blurring. What solves the issue is to pass a withWebp
parameter in Gatsby's configuration, so in gatsby-config.js
:
QUESTION
I can’t resolve issue with building gatsby site on netlify. Since a few days I’m getting following error:
...ANSWER
Answered 2020-Jan-03 at 22:31I had the same issue. Updating gatsby-plugin-netlify-cms to latest version helped.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gatsby-plugin-robots-txt
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page