RxJS version conflict after upgrading to Sanity v3.5.0
This is a classic peer dependency conflict issue with the @sanity/document-internationalization plugin. The root cause is that version 1.0.5 of the plugin requires rxjs@^6.0.0, but Sanity v3.5.0 uses rxjs@^7.0.0, creating an incompatible dependency tree.
The solution is to upgrade to version 1.1.0 or later of the @sanity/document-internationalization plugin, which has been updated to support rxjs 7 and is compatible with Sanity v3:
npm install @sanity/document-internationalization@latestThen remove the manual rxjs entry from your devDependencies in package.json if you added it, and run:
rm -rf node_modules package-lock.json
npm installThe Document Internationalization plugin version 1.1.0+ was specifically updated to resolve this rxjs peer dependency issue. If for some reason you need to stay on an older version temporarily, you can use the --legacy-peer-deps flag during installation, but upgrading the plugin is the proper fix:
npm install --legacy-peer-depsHowever, --legacy-peer-deps is just a workaround that tells npm to ignore peer dependency conflicts - it doesn't actually resolve the underlying incompatibility and could lead to runtime issues.
Why this happened: When Sanity v3 was released, it upgraded to rxjs 7, but some plugins in the ecosystem hadn't caught up yet. The document internationalization plugin was updated shortly after to support the new rxjs version, so upgrading to the latest version of the plugin should resolve all conflicts.
If you're still seeing issues after upgrading, double-check that you don't have any other outdated Sanity plugins that might also have rxjs 6 peer dependencies. You can check this by looking at the error messages - they'll list which packages are causing conflicts.
Show original thread7 replies
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.