
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThis is a classic mismatch between your local package manager (yarn) and what the deployment environment is trying to use (npm). The error message about cipm (a now-deprecated npm command) indicates that your deployment platform is trying to use npm to install packages, but it's looking for package-lock.json which doesn't exist because you're using yarn.
Here are some things to try:
1. Check your deployment platform's settings
If you're deploying to Netlify, Vercel, or another hosting platform (not using sanity deploy), you need to tell it to use yarn instead of npm. Look for:
NPM_USE_YARN=true or similaryarn commands, not npm2. Add a .npmrc or configuration file
Some platforms detect the package manager automatically if you add a .yarnrc file or specify it in your project configuration. Check your platform's documentation for how to specify yarn as the package manager.
3. If using sanity deploy directly
The sanity deploy command should handle this automatically, but if you're seeing this error, try:
package.json scripts use yarn: "deploy": "sanity deploy"yarn install locally first to ensure your yarn.lock is up to datenode_modules or lock files that need clearing4. Switch to npm (if needed)
If the deployment platform doesn't support yarn well, you could:
yarn.locknpm install to generate a package-lock.jsonpackage-lock.json file5. Check for hidden lock files
Sometimes package-lock.json files hide in subdirectories. Run:
find . -name "package-lock.json" -type fAnd delete any you find if you want to stick with yarn.
The key issue is that your deployment environment is configured to use npm but your project is set up for yarn. You need to either configure the deployment to use yarn, or switch your project to npm. If you let me know which platform you're deploying to, I can give more specific guidance!
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