-
Notifications
You must be signed in to change notification settings - Fork 883
Description
Describe the Bug
Running email dev fails with an internal server error when previewing templates. The server log shows a hard import to next/dist/shared/lib/no-fallback-error.external coming from @react-email/[email protected]’s compiled .next output. This path appears to have moved/been removed in recent Next 15.3.x releases.
> @acme/[email protected] dev /Users/brunogomes/CodeHub/github.com/acme/platform/packages/email
> email dev -d ./src/templates -p 3002
React Email 4.2.6
Running preview at: http://localhost:3002
⨯ [Error: Cannot find module 'next/dist/shared/lib/no-fallback-error.external'
Require stack:
- .../node_modules/@react-email/preview-server/.next/server/app/page.js
- .../node_modules/next/dist/server/require.js
- .../node_modules/next/dist/server/next-server.js
- .../node_modules/next/dist/server/next.js] {
code: 'MODULE_NOT_FOUND',
requireStack: [Array]
}
Browser shows a blank page with Internal Server Error.
Which package is affected (leave empty if unsure)
react-email
To Reproduce
When running pnpm dev inside the email package, the React Email preview server fails to start. It tries to require a private Next.js internal module (next/dist/shared/lib/no-fallback-error.external) that no longer exists in Next 15.3.x, causing the preview server to crash before rendering any templates.
Expected Behavior
The preview server should boot and render templates without requiring Next’s private internal modules that don’t exist in Next 15.3.x.
What's your node version? (if relevant)
"engines": {
"node": ">=22.17"
},
"volta": {
"node": "22.17.0",
"pnpm": "10.15.0"
},