Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Error installing sanity/vision plugin, resolved by updating Studio version.

11 replies
Last updated: Jan 19, 2024
I installed
sanity/vision
and the admin throws this error. Appreciate any help!sanity.config.ts


import {defineConfig} from 'sanity'
import {deskTool} from 'sanity/desk'
import {visionTool} from '<@UFY5PJF3M>/vision'
import {schemaTypes} from './schemas'

export default defineConfig({
  name: 'default',
  title: 'Next Sanity Project',

  projectId: 'blgwm78i',
  dataset: 'production',

  plugins: [deskTool(), visionTool()],

  schema: {
    types: schemaTypes,
  },
})
Jan 19, 2024, 7:13 PM
Do you happen to remember which command you used to install the plugin? I think I remember this happening when people installed V2 in a V3 studio.
Jan 19, 2024, 7:32 PM
This one
npm install --save-exact @sanity/vision
Jan 19, 2024, 8:26 PM
  "dependencies": {
    "@portabletext/react": "^3.0.11",
    "@sanity/vision": "3.25.0",
    "next": "14.0.3",
    "next-sanity": "^7.0.1",
    "next-sanity-client": "^1.0.7",
    "react": "^18",
    "react-dom": "^18",
    "sanity": "^3.20.2"
  },
Jan 19, 2024, 8:28 PM
package.json
Jan 19, 2024, 8:28 PM
Can you try updating the Studio to the latest version?
Jan 19, 2024, 8:29 PM
This command?
npm install --global sanity@latest

Jan 19, 2024, 8:31 PM
Use this and it works!
npm install sanity@latest @sanity/vision@latest

Jan 19, 2024, 8:41 PM
Do both package versions need to match? Right now, they use
"^3.25.0"
Jan 19, 2024, 8:43 PM
Naw, they don’t need to be the same. I was thinking maybe there was a bug in the older version of the Studio that was causing it.
Jan 19, 2024, 8:54 PM
Gotcha. Thank you so much!
Jan 19, 2024, 8:57 PM
You’re welcome!
Jan 19, 2024, 8:57 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?