You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to gatsby-source-sanity v7.9.0, node started throwing an obscure error right after Gatsby's onPreInit hook:
success onPreInit - 0.003s
info [sanity] Fetching remote GraphQL schema
error Cannot read properties of undefined (reading 'split')
I was eventually able to figure out that it was because apiHost was reading as undefined in the Sanity config. I didn't see anything in the documentation saying this needed to be provided in gatsby-config.js, but after adding it everything ran fine:
After updating to gatsby-source-sanity v7.9.0, node started throwing an obscure error right after Gatsby's
onPreInit
hook:I was eventually able to figure out that it was because
apiHost
was reading asundefined
in the Sanity config. I didn't see anything in the documentation saying this needed to be provided in gatsby-config.js, but after adding it everything ran fine:I was also able to replicate this issue by starting a new gatsby project using Sanity as a source.
Node Version: v18.12.1
The text was updated successfully, but these errors were encountered: