Skip to content

fix(trigger): add react-dom and react-email to additionalPackages#4052

Merged
waleedlatif1 merged 1 commit intostagingfrom
waleedlatif1/fix-trigger-react-email
Apr 8, 2026
Merged

fix(trigger): add react-dom and react-email to additionalPackages#4052
waleedlatif1 merged 1 commit intostagingfrom
waleedlatif1/fix-trigger-react-email

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Add react-dom and @react-email/render to Trigger.dev additionalPackages
  • Fixes reactDOMServer.renderToPipeableStream is not a function error in lifecycle email task

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 8, 2026

PR Summary

Low Risk
Low risk configuration-only change that adds missing runtime dependencies for Trigger.dev jobs; main risk is a slightly larger bundle or dependency version mismatch at deploy time.

Overview
Fixes Trigger.dev job bundling by adding react-dom and @react-email/render to additionalPackages in apps/sim/trigger.config.ts, ensuring email rendering code has its required runtime dependencies and avoiding renderToPipeableStream-related failures.

Reviewed by Cursor Bugbot for commit 9e8e442. Configure here.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 8, 2026 6:35pm

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 8, 2026

Greptile Summary

This PR adds react-dom and @react-email/render to the Trigger.dev additionalPackages build configuration to fix a reactDOMServer.renderToPipeableStream is not a function error in the lifecycle-email background task. The fix is correct — these packages need to be explicitly bundled in the worker environment since the Trigger.dev build system doesn't automatically include them from transitive dependencies.

Confidence Score: 5/5

Safe to merge — minimal, targeted fix that explicitly bundles required runtime dependencies for the Trigger.dev worker.

Single-file change with 7 lines added, directly addressing a known runtime error. The added packages (react-dom, @react-email/render) are already transitive dependencies used throughout the email rendering pipeline; making them explicit in additionalPackages is the correct Trigger.dev pattern and consistent with how other packages like unpdf and pdf-lib are listed.

No files require special attention.

Vulnerabilities

No security concerns identified. The change only adds package names to a build configuration list; no secrets, credentials, or user input are involved.

Important Files Changed

Filename Overview
apps/sim/trigger.config.ts Adds react-dom and @react-email/render to additionalPackages so they are explicitly bundled in the Trigger.dev worker; change is minimal and directly addresses the reported runtime error.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Trigger.dev Worker Build] --> B[additionalPackages extension]
    B --> C[unpdf]
    B --> D[pdf-lib]
    B --> E[isolated-vm]
    B --> F[pptxgenjs]
    B --> G["react-dom (NEW)"]
    B --> H["@react-email/render (NEW)"]

    I[lifecycleEmailTask] --> J[renderOnboardingFollowupEmail]
    J --> K["@react-email/components render()"]
    K --> L["react-dom/server renderToPipeableStream"]
    L --> G
    K --> H
Loading

Reviews (1): Last reviewed commit: "fix(trigger): add react-dom and react-em..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 merged commit c21876a into staging Apr 8, 2026
7 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/fix-trigger-react-email branch April 8, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant