gatsby: 2.20.8
gatsbh-source-contentful: 2.2.5
I've verified my spaceId
and accessToken
are correct, and I've verified that these keys have access to my Contentful development
environment. I've tried:
GATSBY_CONTENTFUL_OFFLINE
.cache
directory environment
to "master" and removing it completelyI keep getting this error. Any ideas?
ERROR
Accessing your Contentful space failed.
Try setting GATSBY_CONTENTFUL_OFFLINE=true to see if we can serve from cache.
Used options:
spaceId: "*********z1u"
accessToken: "*****************************************vMI'"
environment: "development"
host (default value): "cdn.contentful.com"
downloadLocal (default value): false
localeFilter (default value): [Function]
forceFullSync (default value): false
pageLimit (default value): 100
useNameForId (default value): true
And here's my code from gatsby-config.js
{
resolve: `gatsby-source-contentful`,
options: {
spaceId: process.env.CONTENTFUL_SPACE_ID,
accessToken: process.env.CONTENTFUL_ACCESS_TOKEN,
environment: process.env.CONTENTFUL_ENVIRONMENT,
},
},
Not sure if you got it working in the meantime but I had this same issue and found this on Github https://github.com/gatsbyjs/gatsby/issues/19392 that is what you and I are having.
Apparently, in newer versions of gatsby-source-plugin it requires the key to have access to the master environment as well (which is ridiculous imo).
After giving the key access to master environment it started working.
Had a similar issue, after importing one space to another. I deleted the demo API key (which i had tried to use) and created a new one. Worked after that
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With