I've just finished working on a project using Next.js 13 and Sanity as a headless CMS. Here is the issue I'm experiencing:
When I run
vercel build
I get the error that 'sanity' has no exported member 'defineConfig' and this is coming from the sanity.config.ts file.
I am using Sanity Studio v3 and have setup sanity in my project using
npm create sanity@latest
This is what I've tried. I uninstalled sanity and reinstalled the latest version but that didn't work. Further probing lead me to this gist, so I removed 'deineConfig' import and also as the outer wrapper for the Sanity studio config but that resulted in other errors elsewhere. Specifically, 'sanity' says it has no exported members 'defineType' and 'defineField'.