Skip to content

Commit 281da29

Browse files
committed
Adds a troubleshooting entry for react.email not being bundled correctly
1 parent 82e7484 commit 281da29

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

docs/guides/examples/react-email.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,16 @@ export const sendEmail = task({
334334
});
335335
```
336336

337+
## Troubleshooting
338+
339+
If you see this error when using `react-email` packages:
340+
341+
```
342+
reactDOMServer.renderToPipeableStream is not a function
343+
```
344+
345+
See our [common problems guide](/troubleshooting#reactdomserver-rendertopipeablestream-is-not-a-function-when-using-react-email) for more information.
346+
337347
## Learn more
338348

339349
### React Email docs

docs/troubleshooting.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,29 @@ export default defineConfig({
8383

8484
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).
8585

86+
### `reactDOMServer.renderToPipeableStream is not a function` when using react-email
87+
88+
If you see this error when using `@react-email/render`:
89+
90+
```
91+
TypeError: reactDOMServer.renderToPipeableStream is not a function
92+
at __spreadValues.selectors (file:///node_modules/.pnpm/@react-email+render@1.0.6_react-dom@19.0.0_react@19.0.0/node_modules/@react-email/render/dist/node/index.mjs:162:37)
93+
```
94+
95+
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:
96+
97+
```ts trigger.config.ts
98+
import { defineConfig } from "@trigger.dev/sdk/v3";
99+
100+
export default defineConfig({
101+
project: "<project ref>",
102+
// Your other config settings...
103+
build: {
104+
external: ["react", "react-dom", "@react-email/render", "@react-email/components"],
105+
},
106+
});
107+
```
108+
86109
<CorepackError />
87110

88111

0 commit comments

Comments
 (0)