Issue with Sanity V3 build failing in production environment in Netlify.

2 replies
Last updated: Aug 23, 2023
Hey Everyone,I recently upgrade my Sanity project from V2 to V3. Although it builds fine in my local machine, the build fails in the production environment in Netlify.
I had this same issue when I was building in QA environment in Netlify, and apparently, it was because the .nvmrc file in Sanity code was of an older version. I fixed that and build was success in QA environment for Netlify. But Now I have the same issue in prod, even with the updated node version.

Issue: During Sanity build, it is trying to access the packages that no longer exists in Sanity V3, i.e,
user F
/core
Aug 23, 2023, 6:51 AM
This issue got resolve. Just for anyone else facing these kind of issues -• Make sure env variables are correctly provided
• Make sure the updated node version is being used.
Aug 23, 2023, 7:03 AM
Thanks for sharing your solution!
Aug 23, 2023, 4:58 PM

Sanity – Build the way you think, not the way your CMS thinks

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.

Was this answer helpful?