Deployment error due to missing Sanity package resolved

4 replies
Last updated: Feb 5, 2025
Hi everyone! I am the owner of our sanity project but admittedly not a developer. I'm getting some deployment errors that I think require a more capable person than me. Is there a good resource that I could tap into here? Or if I could be pointed in the direction of a solution? Thank you in advance
npm error code E404
npm error 404 Not Found - GET <https://registry.npmjs.org/@sanity/core/-/core-2.36.2.tgz> - Not found
npm error 404
npm error 404  '@sanity/core@https://registry.npmjs.org/@sanity/core/-/core-2.36.2.tgz' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm error A complete log of this run can be found in: /vercel/.npm/_logs/2025-02-03T17_05_16_751Z-debug-0.log
npm error code 1
npm error path /vercel/path0
npm error command failed
npm error command sh -c cd studio && npm install
npm error A complete log of this run can be found in: /vercel/.npm/_logs/2025-02-03T17_05_07_857Z-debug-0.log
Error: Command "npm install" exited with 1
AI Update

I can help you with this! The error you're seeing is a 404 Not Found error for the @sanity/core@2.36.2 package. This is happening because something in your project's dependencies is trying to fetch the package from an incorrect URL format.

What's causing your error

The 404 error typically happens due to one of these issues:

  1. Corrupted package-lock.json or node_modules - Sometimes npm's lock file can reference package URLs that don't resolve correctly
  2. A typo or formatting issue in package.json - The dependency might be incorrectly specified
  3. npm registry caching issues - Occasionally the registry has temporary problems serving older packages

The fact that you're on @sanity/core@2.36.2 tells me you're running Sanity Studio v2, which reached its end of life on April 1, 2024. While v2 packages technically still exist in the npm registry, they're no longer maintained, and deployment issues like this are becoming more common as the ecosystem moves forward.

What you should do

Since you mentioned you're not a developer, you'll definitely want to bring in someone with development experience to help with this. Here are your best options:

1. Hire a Sanity expert

  • Check out the Sanity Exchange to find certified partners and agencies who specialize in Sanity

2. Post in the Sanity Community Slack

  • Join the Sanity Community Slack where developers can offer real-time guidance (there's a #help channel specifically for this)

3. If you have a paid Sanity plan

  • Contact Sanity support directly through your dashboard for assistance

What your developer will need to do

A developer can try a quick fix first:

  • Delete package-lock.json and node_modules folder
  • Clear npm cache with npm cache clean --force
  • Run npm install again

However, since v2 is no longer supported, they should really upgrade your project to Studio v3 (which has been the current version since December 2022). The migration involves:

  • Updating to a single sanity npm package instead of multiple v2 packages like @sanity/core
  • Converting sanity.json config files to sanity.config.js
  • Updating to React 18
  • Replacing any v2 plugins with v3-compatible versions

Good news: Your content and data are completely safe - this is just a code/configuration update for your Studio interface. The migration is well-documented and a developer familiar with Sanity should be able to handle it.

Don't try to fix this yourself if you're not comfortable with code. Getting proper help now will save you headaches down the road!

Hi BarbieπŸ‘‹
What version of Sanity are you using?
This issue was reported in another thread here in the last couple of days. Sanity seems to have unpublished a package which many sites have as a dependency which are messing with deployments.
I found the thread. It was accidental and should be restored as of Monday afternoon
user C
. You can probably just 'try again' and get it going.

https://sanity-io-land.slack.com/archives/C9Z7RC3V1/p1738607180617139?thread_ts=1738581992.284119&amp;cid=C9Z7RC3V1
oh it worked now! thank you
user P
and
user J
for jumping in to help

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?