
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThis isn't really a Sanity issue - it's a Netlify build configuration problem with your monorepo setup. The error sh: 1: next: not found combined with npm WARN Local package.json exists, but node_modules missing indicates that Netlify isn't properly installing dependencies in your web folder when using cached builds.
While you have a Sanity Studio in your project, the build failure is happening because Netlify's cache restoration isn't triggering dependency installation correctly for your Next.js application. This is a common Netlify monorepo caching issue.
You'll want to reach out to Netlify support or check their documentation for monorepo build configuration. Some common solutions involve:
netlify.toml file with proper base directory settingsNPM_CONFIG_PRODUCTION environment variableSince this is about Netlify's build process rather than Sanity's functionality, the Netlify support forums or their documentation on monorepo builds would be the best place to get help with this specific issue.
If you were having issues with sanity build or deploying your Sanity Studio specifically, that's where the Sanity community could help - but in this case, your Studio build is actually succeeding; it's the Next.js build that's failing due to Netlify's dependency management.
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 operations
Content backend


The only platform powering content operations
By Industry


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