RxJS "tap" import error in Sanity v3 portable-text-editor

13 replies
Last updated: Jan 28, 2026
Hi folks! I'm currently upgrading from v2 to v3 and when I run "sanity dev" or "npm run dev" i get this message:

node_modules/@sanity/portable-text-editor/lib/index.esm.js:5:16: ERROR: No matching export in "node_modules/rxjs/_esm5/index.js" for import "tap"

As several people already suggested, I've tried deleting my `node_modules`folder and installing again, but it doesn't work.

Anyone else got a solution for this?
AI Update

This is a known issue that occurred during the v2 to v3 migration, and it's specifically related to the @sanity/document-internationalization plugin having incompatible RxJS peer dependencies. Here's what's happening and how to fix it:

The Root Cause

The error you're seeing is because @sanity/document-internationalization version 1.0.5 requires RxJS v6, but Sanity v3 uses RxJS v7. This creates a peer dependency conflict that npm can't resolve automatically.

Solutions (in order of preference)

1. Update the document-internationalization plugin (Best solution)

The plugin has been updated to support RxJS v7. According to the community discussion, updating to @sanity/document-internationalization@^1.1.0 or later should resolve this. Make sure you're on the latest version:

npm install @sanity/document-internationalization@latest

2. Use the --legacy-peer-deps flag

As confirmed in this thread, installing with the legacy peer deps flag works as a workaround:

npm install --legacy-peer-deps

You can also add this to your .npmrc file to make it permanent:

legacy-peer-deps=true

3. Clean install process

Sometimes the issue resolves with a complete clean install:

rm -rf node_modules package-lock.json
npm install --legacy-peer-deps

4. Temporary workaround (if nothing else works)

Add RxJS 7.8.0 as a dev dependency to force the correct version:

npm install rxjs@^7.8.0 --save-dev --legacy-peer-deps

Why This Happens

This is a transitional issue that affected early v3 adopters. The @sanity/document-internationalization plugin initially had a peer dependency on RxJS v6, while Sanity v3 moved to RxJS v7. The plugin has since been updated, but if you're using an older version or have a locked package-lock.json, you'll hit this conflict.

The good news is that several people in the community reported that after trying these solutions (particularly the clean install or updating the plugin), "it suddenly started working" - so don't give up if the first attempt doesn't work!

Show original thread
13 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.

Was this answer helpful?