Error using customTypesApiToken on Gatsby Cloud

I can develop and build locally, my custom types working as intended.

But when Gatsby Cloud tries to build my project I get this error message:

Expected a value of type never for customTypesApiToken but received "THE_TOKEN"`.

(where THE_TOKEN is my actual customTypesApi token..)

"gatsby": "^3.11.1",
"gatsby-source-prismic": "^4.0.2",
"prismic-reactjs": "^1.3.4",
"prismic-cli": "^4.0.7",

Hello @rafael.lohn, thanks for reaching out

It seems like you have the correct setup in both your project code and in the Gatsby Cloud settings because the token is being read correctly.

It might be that you need to clear the cache of your project. A previous version of the plugin might be conflicting with the latest version, V4. Clear the cache, re-build your project and let us know if this helps.

I don't think that's something I have control over at Gatsby Cloud.
I'll both try again tomorrow - and if it's cache maybe it will have expired on their end - and explore if I can force clear it.

Di you had any luck with this today @rafael.lohn?

Are you adding the correct token for the Custom Types API?
You need to add the one that appears in the same tab as the Custom Types API endpoint in your repository

Sorry for the delay. The token was/is correct and a few days later I forced a rebuild and it worked :man_shrugging:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.