diff --git a/packages/react-email/src/cli/utils/preview/start-dev-server.ts b/packages/react-email/src/cli/utils/preview/start-dev-server.ts index fbea884815..454ae1de9a 100644 --- a/packages/react-email/src/cli/utils/preview/start-dev-server.ts +++ b/packages/react-email/src/cli/utils/preview/start-dev-server.ts @@ -120,7 +120,9 @@ export const startDevServer = async ( // this is the most reliable way of communicating these paths through process.env = { NODE_ENV: 'development', - ...process.env, + ...(process.env as Omit & { + NODE_ENV?: NodeJS.ProcessEnv['NODE_ENV']; + }), ...getEnvVariablesForPreviewApp( // If we don't do normalization here, stuff like https://github.com/resend/react-email/issues/1354 happens. path.normalize(emailsDirRelativePath),