Issue with build process after making a small change in Vercel deployment
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
. I suspect this may be related to an unintended breaking change in a dependency of
. Can you please try pinning your version to
? You can do this in your package.json by removing the caret from the version (e.g.,
), then deleting node_modules and your lock file and re-installing with
Jul 3, 2023, 8:17 PM
, 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.