
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI understand you're running into the "can't access property 'style', popper is undefined" error when trying to compile Sanity Studio. This is a frustrating build-time error that typically points to dependency resolution issues.
While I can't find specific documentation about this exact error message in Sanity's official docs, this type of error generally occurs when there are problems with how your package manager is resolving dependencies during the build process. Here are the most reliable troubleshooting steps:
1. Clean install of dependencies:
# Remove existing dependencies
rm -rf node_modules
rm package-lock.json # or yarn.lock if using Yarn
# Reinstall
npm install
# or
yarn install2. Clear build caches:
# Clear npm cache
npm cache clean --force
# If using Yarn
yarn cache clean3. Try a different package manager:
Based on community experiences, some developers have resolved similar dependency issues by switching between npm and Yarn. If you're using Yarn, try npm (or vice versa).
4. Check your Node.js version:
Make sure you're using a compatible Node.js version. Sanity Studio v3+ requires Node.js 18 or later, and Studio v4 requires Node.js 20+. Check with:
node -v5. Update Sanity packages:
npm install sanity@latestIf you're on npm 7 or higher and encountering peer dependency conflicts, you can try the legacy peer deps flag:
npm install --legacy-peer-depsSince this specific error can have various root causes, it would help to know:
If the above steps don't resolve it, I'd recommend checking the Sanity Slack community or creating a support ticket with more details about your setup, as this may be related to a specific plugin or configuration in your project.
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