Netlify build errors
See original GitHub issueResently upgraded gatsby-plugin-robots-txt
from 1.5.5 to 1.6.2 and I am getting this Netlify build error:
7:56:33 AM: error "gatsby-plugin-robots-txt" threw an error while running the onPostBuild lifecycle:
7:56:33 AM: Cannot read property 'startsWith' of null
7:56:33 AM: 78 | new URL(mergedOptions.sitemap)
7:56:33 AM: 79 | } catch {
7:56:33 AM: > 80 | mergedOptions.sitemap = new URL(mergedOptions.sitemap.startsWith(pathPrefix) ? mergedOptions.sitemap : path.posix.join(pathPrefix, mergedOptions.sitemap), mergedOptions.host).toString()
7:56:33 AM: | ^
7:56:33 AM: 81 | }
7:56:33 AM: 82 | }
7:56:33 AM: 83 |
My config is a one-to-one copy of the Netlify example in the docs. Went back to 1.5.6 and everything is fine. I’m assuming it has something to do with the changes in #441 and the docs just need to be updated with a new elimination.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Build troubleshooting tips - Netlify Docs
# Build fails with exit status 128 ... Typically this means that we don't have permission to clone the repository you are trying...
Read more >Deploy failed Netlify - Stack Overflow
Go to: Site settings > Build & deploy > Build image selection > Edit settings. · Choose Ubuntu Xenial 16.05. · Save and...
Read more >2 ways to overcome deployment problems with React on Netlify
It is because netlify treats any warnings emitted by react as errors therefore failing the build process. I remember ignoring the warnings by ......
Read more >Occasional Netlify build failures (Build exceeded maximum ...
Problem: I've seen several times where the build from Netlify in PR fails without a build error. In this case, Netlify log ends...
Read more >How to Deploy a React Router App to Netlify and Fix the ...
Have you ever experienced a “PAGE NOT FOUND” error when trying to ... Netlify helps web developers build and deploy their applications ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Latest merge was suppose to fix this but is not yet in
npm
.npm
version still at 1.6.8@wildpow thanks for the step-by-step help for this!
~I think it‘s because I don‘t know how to do
2. Disabled Gatsby cache plug-in.
which is why I think even though I‘m on1.5.6
I still get the error~edit: figured it out @wildpow thank you!