After completing a project using Next.js 13 and Sanity as the headless CMS, I encountered an issue.
Upon running
vercel build
I received an error stating that 'sanity' had no exported member 'defineConfig' within the sanity.config.ts file.
My project includes Sanity Studio v3, set up with
npm create sanity@latest
Despite attempting to uninstall and reinstall the latest version of Sanity, the issue persisted. Upon further investigation, I came across this gist. I removed the 'defineConfig' import and altered the outer wrapper for the Sanity studio config, but this resulted in additional errors. Specifically, 'sanity' indicated it had no exported members 'defineType' and 'defineField'.