Search code examples
javascriptsanity

Error: No "sanity.json" file found in plugin "@sanity/vision"


As I was creating my new sanity project on my terminal while running "sanity init" during the process I received an error of:

"Error: No "sanity.json" file found in plugin "@sanity/vision""

I have been trying to solve this error for quite some time. I know it's very similar to this question on Stackoverflow of Error: No "sanity.json" file found in plugin "@sanity/base". The error even suggest I look into this doc on Sanity https://www.sanity.io/help/missing-plugin-sanity-json. I have tried to do all the solutions . I deleted my node_modules folder and ran the "sanity install" command. It did not work. I tried deleting the whole project and create a new one and I still recieved the error. I tried following that sanity document on what I should do(Although I did not I understand what they wanted me to do) it still did not work.

Here is the error message:

Error: No "sanity.json" file found in plugin "@sanity/vision"
See https://docs.sanity.io/help/missing-plugin-sanity-json
    at handleManifestReadError (C:/Users/Bernadette Kotelo/Documents/Projects/Renanit's Art Portfolio/server/node_modules/@sanity/resolver/lib/readManifest.js:27:11)
    at C:/Users/Bernadette Kotelo/Documents/Projects/Renanit's Art Portfolio/server/node_modules/@sanity/resolver/lib/readManifest.js:56:60
    at async Promise.all (index 4)

Can anyone please help me understand and solve this error. Thank you


Solution

  • Make sure you are using an up to date node version, I get this error when I ran sanity init using 14v, try deleting your project and run sanity init with node v18.2.0 or higher.