Closed paweltar closed 7 years ago
It looks like the gallery query is pulling from an absolute path, not a relative one. Try changing from /home/paewalter/... to something relative to project root.
thanks a lot @brandonmp, yes, this was the problem! Of course, there was no path like "/home/paweltar/something/something/" on Netlify, I don't know how I missed it. I'm closing the issue now.
This is my first project using Gatsby and Graphql, so perhaps I just missed something important but I run out of ideas how to fix it.
On my website I'm making a graphql query for multiple images to optimize them with Image Sharp and pass them to Gallery Component - it works when I'm executing 'gatsby build' locally but it's throwing an error on Netlify.
Netlify log looks like this:
index.js page template looks like this: (link to github in case it would be helpful)
package.json: (I switched some packages to 'latest' version in hope this would help but it didn't change anything in this case)
If I just copy the public folder to some hosting then it works as expected - but if I try to build this on Netlify then this one specific part of graphql query related to gallery component is always empty. It looks like this part of the query is not finished when HTML is generated. Data necessary for other components is returned without problems even during build on Netlify.