Issue with running `sanity deploy` after upgrading to V3, error related to missing sanity.json file.

6 replies
Last updated: Feb 22, 2023
Hi all, I've had an issue appear after upgrading to V3. I can't run
sanity deploy
(or
configcheck
) as the following error is returned...

Error: ENOENT: no such file or directory, open '/Users/marks/client-work/surf-simply/surf-simply/studio/sanity.json'

Obviously
sanity.json
haas been removed in favour of
sanity.config.js
so I'm not sure what's looking for that file. Studio is working perfectly locally.
here is the following console warning when running locally...

`Both
@sanity/core
AND
sanity
installed - assuming Sanity v3 project.`
I can't find any reference to
@sanity/core
anywhere in my project though. So, yeah, weird one. V2 to V3 upgrade.
Any help would be really amazing... thank you
πŸ™
Feb 20, 2023, 10:59 PM
This is probably a long shot but have you tried removing
node_modules
and reinstalling?
Feb 21, 2023, 2:00 PM
Have you also upgraded your CLI to the latest version?
Feb 21, 2023, 7:41 PM
Thank you so much, back up and running! πŸ™‚
Feb 21, 2023, 9:18 PM
Awesome! Good luck with the rest of your migration!
Feb 21, 2023, 9:49 PM
So I just wanted to follow up with a more macro thank you... you're always so helpful
user M
and just make working with dream software like Sanity all the more dreamy. Props to you and the rest of the Sanity team for not only making the best product around but also a community to match. πŸ‘Š
Feb 22, 2023, 9:20 AM
Thank you, User! That means a lot!
Feb 22, 2023, 5:39 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?