Hello,
I am helping a friend out with a Next.js project that utilizes Sanity. When attempting a preview build on Vercel, we keep getting the following error:
Type error: Page "src/app/studio/[[...tool]]/page.tsx" does not match the required types of a Next.js Page."viewport" is not a valid Page export field.The contents of page.tsx is an exact copy of the example at https://www.sanity.io/plugins/next-sanity#studio-route-with-app-router :
// ./src/app/studio/[[...tool]]/page.tsximport {NextStudio} from 'next-sanity/studio'import config from '../../../../sanity.config'export const dynamic = 'force-static'export {metadata, viewport} from 'next-sanity/studio'export default function StudioPage() { return <NextStudio config={config} />}Locally, everything works fine. Has anyone else run into this issue before? I'm new to Vercel, Sanity and Next.js, but my jellies tell me it may be an environmental difference between Vercel and my local environment.
Any help would be greatly appreciated, thank you!