Issue installing the official sanity media plugin on Sanity v3.
4 replies
Last updated: Jan 16, 2023
A
Hello dear community!I’m having hard times installing the official sanity media plugin on Sanity v3.
I start from a blank project using
but I keep getting this message:
I haven’t done any type of configuration, I’m using
node v18 LTS and I run this command on macOS Monterey.
Does anyone have experience with this issue?
I start from a blank project using
npm create sanity@latestand then I run
npm install --save sanity-plugin-media@studio-v3
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: sanity-v3-test@1.0.0 npm ERR! Found: sanity@3.2.3 npm ERR! node_modules/sanity npm ERR! sanity@"^3.0.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer sanity@"dev-preview || 3.0.0-rc.0" from sanity-plugin-media@2.0.0-v3-studio.3 npm ERR! node_modules/sanity-plugin-media npm ERR! sanity-plugin-media@"2.0.0-v3-studio.3" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry
node v18 LTS and I run this command on macOS Monterey.
Does anyone have experience with this issue?
Jan 16, 2023, 8:36 AM
A
This is the package.json file:
{ "name": "sanity-v3-test", "private": true, "version": "1.0.0", "main": "package.json", "license": "UNLICENSED", "scripts": { "dev": "sanity dev", "start": "sanity start", "build": "sanity build", "deploy": "sanity deploy", "deploy-graphql": "sanity graphql deploy" }, "keywords": [ "sanity" ], "dependencies": { "@sanity/vision": "^3.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-is": "^18.2.0", "sanity": "^3.0.0", "styled-components": "^5.2.0" }, "devDependencies": { "@sanity/eslint-config-studio": "^2.0.1", "eslint": "^8.6.0", "prettier": "^2.8.3", "typescript": "^4.0.0" }, "prettier": { "semi": false, "printWidth": 100, "bracketSpacing": false, "singleQuote": true } }
Jan 16, 2023, 8:37 AM
A
Running just that command worked!I guess the readme file mislead me a bit. I wasn’t sure what was the best way to install the plugin with the newest studio. Thanks
user Y
!Jan 16, 2023, 8:45 AM
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.