Skip to content

Docs: Adds a troubleshooting entry for react.email not being bundled correctly #2117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/guides/examples/react-email.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,16 @@ export const sendEmail = task({
});
```

## Troubleshooting

If you see this error when using `react-email` packages:

```
reactDOMServer.renderToPipeableStream is not a function
```

See our [common problems guide](/troubleshooting#reactdomserver-rendertopipeablestream-is-not-a-function-when-using-react-email) for more information.

## Learn more

### React Email docs
Expand Down
23 changes: 23 additions & 0 deletions docs/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,29 @@ export default defineConfig({

If you see this error, add pino (and any other associated packages) to your `external` build settings in your `trigger.config.ts` file. Learn more about the `external` setting in the [config docs](/config/config-file#external).

### `reactDOMServer.renderToPipeableStream is not a function` when using react-email

If you see this error when using `@react-email/render`:

```
TypeError: reactDOMServer.renderToPipeableStream is not a function
at __spreadValues.selectors (file:///node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@react-email/render/dist/node/index.mjs:162:37)
```

This happens because react-email packages have bundling conflicts with our build process. To fix this, add the react-email packages to your `external` build settings in your `trigger.config.ts` file:

```ts trigger.config.ts
import { defineConfig } from "@trigger.dev/sdk/v3";

export default defineConfig({
project: "<project ref>",
// Your other config settings...
build: {
external: ["react", "react-dom", "@react-email/render", "@react-email/components"],
},
});
```

<CorepackError />


Expand Down