Build issue with Netlify when adding react-icons to Sanity studio
I can see this is a case sensitivity issue with your react-icons imports, though I should mention this is more of a general JavaScript/React question than a Sanity-specific one. For pure library issues like this, you'll typically get faster answers in JavaScript/React communities or the react-icons GitHub repository.
That said, since you're working with Sanity Studio's desk structure, here's what's happening:
Your import paths have uppercase letters:
import {AiFillSetting, ...} from 'react-icons/Ai'
import {GoThreeBars} from 'react-icons/Go'
import {RiGlobeFill} from 'react-icons/Ri'They should be lowercase:
import {AiFillSetting, ...} from 'react-icons/ai'
import {GoThreeBars} from 'react-icons/go'
import {RiGlobeFill} from 'react-icons/ri'Why it works locally but fails on Netlify: Your local machine (likely macOS or Windows) has a case-insensitive file system, so Ai and ai resolve to the same location. Netlify uses Linux with a case-sensitive file system, which looks for a literal folder named Ai that doesn't exist (the actual folder is ai).
This is a common deployment gotcha when working with Studio configurations. Fix those import paths to lowercase and your Netlify build should succeed. Your desk structure code otherwise looks fine!
For future reference, questions about third-party libraries like react-icons are better suited for general JavaScript forums, while the Sanity community is best for questions about Sanity APIs, Studio configuration, GROQ queries, and platform-specific features.
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.