Open chrisworman-pela opened 4 years ago
Hey, @chrisworman-pela, check out issue #162 for a hacky workaround.
I have confirmed that the workaround mentioned by @codingwithchris is working (Thanks @codingwithchris !!!). Specifically, you need to add the following to your gatsby-node.js
file:
const fs = require('fs');
const dir = "./.cache/caches/gatsby-source-prismic-graphql"
exports.onPreBootstrap = () => {
if (!fs.existsSync(dir)){
fs.mkdirSync(dir);
}
}
Is this an issue with gatsby-source-prismic-graphql
or in a dependency? If it is an issue with a dependency, has it been logged as an issue in the appropriate repository?
Also, I think the documentation for gatsby-source-prismic-graphql
should be updated to include the workaround since it's a prerequisite to using a documented feature.
I'm seeing an issue regarding images in
3.6.2
. The behaviour I'm seeing is that you have to rungatsby develop
twice for images to work, even forgatsby build
.I have a minimal prismic/gatsby project setup. Here is some information regarding (perhaps) relevant dependencies, which are all at the latest version at the time of writing this issue:
Here is my configuration for
gatsby-source-prismic-graphql
ingatsby-config.js
:I'm processing images in queries like this:
Steps to reproduce (I have a minimal project with a handful of images):
gatsby clean
gatsby develop
I get the following error message:
Importantly, when I run
gatsby develop
a second time, the project builds fine.Now if I run
gatsby clean
and thengatsby develop
I get the same error shown above.Similarily, if I run
gatsby clean
thengatsby build
, I get the same error shown above, but if I rungatsby develop
twice (as described above) first then rungatsby build
, I get a successful build.Purely speculation, but the error indicates that an image cannot be found on the local machine, so perhaps the issue is related to a race-condition downloading the images?