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:
- Enabling
GATSBY_CONTENTFUL_OFFLINE
- Deleting the
.cache
directory - Deleting node_modules
- Setting
environment
to "master" and removing it completely - Wrapping the env vars in template literals (suggested on an old github issue)
I 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,
},
},