
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThis issue is actually not Sanity-specific—it's related to react-icons v4 breaking changes where deep import paths like 'react-icons/lib/io/android-color-palette' were removed.
The react-icons library deprecated and removed support for deep imports from the /lib directory in version 4. Previously, you could import icons using paths like:
import Icon from 'react-icons/lib/io/android-color-palette'But this no longer works. The library now requires you to import icons using the top-level icon set imports with proper component names:
import { IoAndroidColorPalette } from 'react-icons/io'How to fix this:
Find the correct icon component name: The path android-color-palette becomes IoAndroidColorPalette in camelCase with the icon set prefix (Io for Ionicons)
Update your imports: Change from deep imports to named imports from the icon set:
// Old (broken):
import Icon from 'react-icons/lib/io/android-color-palette'
// New (correct):
import { IoAndroidColorPalette } from 'react-icons/io'Common icon set prefixes:
react-icons/io → Io prefix (Ionicons)react-icons/fa → Fa prefix (Font Awesome)react-icons/md → Md prefix (Material Design)react-icons/hi → Hi prefix (Heroicons)react-icons/ai → Ai prefix (Ant Design)react-icons/bs → Bs prefix (Bootstrap)If you're using these icons in Sanity Studio schema definitions (like for document type icons), the same fix applies—just update the import path and use the named export:
// In your schema file
import { IoAndroidColorPalette } from 'react-icons/io'
export default {
name: 'myDocumentType',
type: 'document',
icon: IoAndroidColorPalette,
// ...
}Why this happened: When you upgraded Sanity, it likely updated your dependencies including react-icons to v4+, which introduced this breaking change. The library maintainers removed deep imports to improve tree-shaking and bundle sizes.
You can absolutely still use react-icons—you just need to update your import statements to the new format! The icons themselves haven't been removed, just the way you import them has changed.
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.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store