Gatsby 盖茨比在.cache中找不到目录/文件
我使用的是Gatsby 盖茨比在.cache中找不到目录/文件,gatsby,contentful,Gatsby,Contentful,我使用的是downloadLocal设置为true: { resolve: "gatsby-source-contentful", options: { spaceId: `my_space_id`, accessToken: `my_access_token`, downloadLocal: true, }, }, 但是,当我运行gatsby develope时,看起来gatsby在.cache中找不到本地文件。我发现以下错误: 错误:enoint:没有这
downloadLocal
设置为true
:
{
resolve: "gatsby-source-contentful",
options: {
spaceId: `my_space_id`,
accessToken: `my_access_token`,
downloadLocal: true,
},
},
但是,当我运行gatsby develope
时,看起来gatsby在.cache中找不到本地文件。我发现以下错误:
错误:enoint:没有这样的文件或目录,请打开“/basedir/.cache/caches/gatsby transformer sharp/diskstore-df6bcaa954c0509aba9763a79d7b38ae.lock”
错误
eNote:没有这样的文件或目录,请打开“/basedir/.cache/caches/gatsby transformer sharp/diskstore-76c631915cf90316264f3f99de26b5c.lock”
以及:
工作错误:处理/basedir/.cache/gatsby源文件系统/02a25f085c33da92b05fb482655e7db3/FILENAME_HERE.jpg失败
原始错误:
/basedir/node_modules/cwebp-bin/vendor/cwebp:加载共享库时出错:libpng12.so.0:无法打开共享对象文件:没有此类文件或目录
当我查看.cache/gatsby源文件系统和.cache/caches/gatsby transformer sharp时,我看到这些文件确实存在
下面是我在gatsby-node.js中的查询:
allContentfulBlogPost {
nodes {
featuredImage {
localFile {
childImageSharp {
fluid(maxWidth: 100) {
src
srcSet
...
}
}
}
}
}
}
我试过清理缓存。我已经把它们放进了gatsby-config.js中:
{
resolve: `gatsby-source-filesystem`,
options: {
name: `cache`,
path: `${__dirname}/.cache`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `cache-gatsby-transformer-sharp`,
path: `${__dirname}/.cache/caches/gatsby-transformer-sharp`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `cache-gatsby-source-filesystem`,
path: `${__dirname}/.cache/gatsby-source-filesystem`,
},
},
我也看到过,但我不认为这是完全相同的问题
我应该怎么做才能让盖茨比在.cache中找到这些文件和目录?盖茨比在盖茨比站点根目录的.cache文件夹中保留数据和渲染资产的缓存,这样它就不必重复处理优化资源的工作 尝试:
gatsby clean
然后gatsby develop
更多信息,请遵循此说明。盖茨比在盖茨比网站根目录的.cache文件夹中保留数据和渲染资产的缓存,以便不必重复处理优化资源的工作 尝试:
gatsby clean
然后gatsby develop
更多信息请点击这里