Installing Mux with Sanity v2 - compatibility issues
I can see you're struggling with installing the Mux plugin for Sanity v2. This is actually a known issue because Sanity v2 is now deprecated, and the plugin ecosystem has moved on to support Sanity Studio v3.
The good news is that there's still a working version for v2, but you need to install it specifically. Here's what you need to do:
For Sanity Studio v2
Install the Studio v2 version explicitly using the @studio-v2 tag:
yarn add sanity-plugin-mux-input@studio-v2or with npm:
npm install sanity-plugin-mux-input@studio-v2The Studio v2 README has specific instructions for the v2 version.
Common Installation Issues
If you're still having trouble, here are some things to check:
Package name confusion: The package is called
sanity-plugin-mux-input, not@sanity/mux-input(which was the old deprecated name)Mux API credentials: Make sure you have your Mux Access Token and Secret Key ready. You'll need to generate these from your Mux dashboard with permissions for both read/write video and read data.
Schema configuration: After installing, you need to add it to your schema. For v2, this looks like:
{
title: 'Video',
name: 'video',
type: 'mux.video'
}- Signing key issues: One common problem is an incorrect signing key in your Mux configuration. If your uploads are failing, double-check that your Mux Access Token has the correct permissions and that you're using the right signing key.
Consider Upgrading to Studio v3
Since you're having installation issues anyway, this might be a good time to consider upgrading to Sanity Studio v3. The current version of the plugin (sanity-plugin-mux-input) is actively maintained for v3, and you'll have much better support going forward. Studio v2 reached end-of-life, so you'll increasingly run into compatibility issues with newer tools and dependencies.
For Studio v3, the installation is simpler:
npm install sanity-plugin-mux-inputThen add it to your sanity.config.ts:
import {defineConfig} from 'sanity'
import {muxInput} from 'sanity-plugin-mux-input'
export default defineConfig({
plugins: [muxInput()],
})If you share more details about the specific error messages you're seeing during installation, I can help troubleshoot further!
Show original thread5 replies
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.