
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeGood news - these are just warnings, not errors! Your project should run fine despite these messages.
The issue is that next-sanity-image@6.0.0 specifies it needs @sanity/client@^5.0.0 as a peer dependency, but you've installed @sanity/client@5.4.2. The ^5.0.0 notation means "any version 5.x.x", so version 5.4.2 actually does satisfy that requirement. npm is just being cautious and warning you about the version resolution.
Why you're seeing this:
npm's peer dependency resolver is sometimes overly cautious. The warning appears because npm is detecting a potential version mismatch, but in reality, @sanity/client@5.4.2 is perfectly compatible with next-sanity-image@6.0.0's requirements.
What you should do:
--legacy-peer-deps or --force unless absolutely necessary - these flags can hide real dependency issuesIf you want cleaner installs:
You could consider updating to a more recent version of @sanity/client (the latest is now v6+), though be aware this might require updating other Sanity packages in your project. The next-sanity-image package should work with newer client versions too.
Alternative approach:
If you're starting a new project or can refactor, you might want to look at next-sanity which provides official Next.js integration including image handling, and tends to have better maintained peer dependencies.
The bottom line: these warnings are cosmetic. Your setup should work perfectly fine as-is! You don't need to install dependencies one by one - there's no actual conflict here, just npm being overly cautious about version matching.
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