Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Issue with build process after making a small change in Vercel deployment

3 replies
Last updated: Jul 3, 2023
This morning I deployed a couple of changes to vercel and the build process worked. I made one small change (added an icon) and then re-committed. All of my builds are failing now with the error:
Failed to compile.
./node_modules/@hookform/resolvers/dist/resolvers.mjs
Attempted import error: 'set' is not exported from 'react-hook-form' (imported as 'i')
Import trace for requested module:
./node_modules/@hookform/resolvers/dist/resolvers.mjs
/node_modules/@hookform/resolvers/yup/dist/yup.mjs
/node_modules/sanity-plugin-media/lib/index.esm.js
/sanity.config.js
/app/(admin)/studio/[[...index]]/page.js

I am running Sanity Studio from the App directory.

Current version of next-sanity is 5.1.0

The failed builds coincide with the exact time that Next v13.4.8 was released.

Any suggestions other than starting from scratch again with the implementation of Studio? Anybody else experiencing this?
Jul 3, 2023, 6:13 PM
Hi
user V
. I suspect this may be related to an unintended breaking change in a dependency of
sanity-plugin-media
. Can you please try pinning your version to
2.0.5
? You can do this in your package.json by removing the caret from the version (e.g.,
"sanity-plugin-media": "2.0.5"
), then deleting node_modules and your lock file and re-installing with
npm i
.
Jul 3, 2023, 8:17 PM
Hi
user A
,
Thanks for such a prompt reply and bailing me out on this. Your suggestion worked and I have successfully re-deployed to Vercel. I ended up removing my admin folder that has the studio pages within it from the push to the repo and subsequent pipeline to vercel. That helped me to get my changes deployed. I was then able to do as you suggested, prove it worked, then redeploy with my admin folder, and then access the studio on the production site.
Jul 3, 2023, 8:24 PM
Great! Glad to hear it, Brett. The team is working on a resolution.
Jul 3, 2023, 8:44 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?