Trouble installing Sanity SEO plugin, resolved with corrected command

9 replies
Last updated: Jul 6, 2023
Hi! I am trying to install the sanity Seo Plugin but it throws me an error every time. Any idea why?Thnks in advance

sanity install seo-pane

AI Update

The sanity install command is deprecated and no longer works in Sanity Studio v3! That's why you're getting an error.

The old sanity install seo-pane command was only for Studio v2. In Studio v3, you need to install plugins using npm or your package manager directly.

For the SEO Pane plugin, here's what you should do:

Install it with npm:

npm install sanity-plugin-seo-pane

Then add it to your sanity.config.ts file:

import {defineConfig} from 'sanity'
import {seoPane} from 'sanity-plugin-seo-pane'

export default defineConfig({
  // ... other config
  plugins: [
    seoPane({
      // your configuration options
    })
  ]
})

This is the standard way to install all plugins in Studio v3 - the CLI-based sanity install command was completely removed when Studio v3 launched. You'll always use npm/yarn/pnpm to install packages, then manually add them to your config file's plugins array.

Check out the plugin's documentation for specific configuration options you'll need to set up, like defining which fields to analyze and configuring the preview URL.

looks like you need
sanity-plugin-seo-pane
yes, i am tryign to install it. I am doing something wrong with this command?
sanity install seo-pane

yes, the install command is
npm i sanity-plugin-seo-pane
I get this error, do you know why could it be?
/node_modules/yoastseo/node_modules/node-sass
npm ERR! command failed
not without more context, unfortunately
thank you! i fixed it! Thanks!
Hello
user L
, I got exactly the same problem. How did you fix that ? Node or Npm version ?
hi
user C
, i think it was the node version

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?