
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThis is a classic dependency version conflict issue between sanity-plugin-media and react-hook-form. The error occurs because @hookform/resolvers (used by the media plugin) is trying to import a set function that doesn't exist in older versions of react-hook-form.
The timing with Next.js 13.4.8's release is likely coincidental - what probably happened is that your lockfile got regenerated during the build, pulling in newer versions of dependencies that are incompatible with each other.
Here's how to fix it:
set export):npm install react-hook-form@latestnpm install @hookform/resolvers@latestrm -rf node_modules package-lock.json
npm installpackage.json for any version constraints that might be preventing the update. You want:react-hook-form: ^7.43.0 or higher@hookform/resolvers: ^3.0.0 or highersanity-plugin-media continues to cause dependency issues, consider using Sanity's built-in asset management features or look for more actively maintained alternatives.Why this happened: The sanity-plugin-media package has specific peer dependency requirements. When your build process ran, it likely resolved to incompatible versions of react-hook-form and @hookform/resolvers. The set utility was added to react-hook-form in v7.43.0, but older versions don't have it.
For Vercel specifically: Make sure to clear Vercel's build cache after updating your dependencies. You can do this in your project settings under "Deployments" → click the three dots menu → "Redeploy" with "Use existing Build Cache" unchecked.
You definitely don't need to start from scratch - this is purely a dependency version mismatch that can be resolved by aligning your package versions.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content backend


The only platform powering content operations


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store