react-email
react-email copied to clipboard
Can't export email to HTML
- create a new project
npx create-email@latest
- install packages with
yarn
-
yarn dev
- is ok -
yarn export
- this error ->
yarn run v1.22.19
$ email export
â ‹ Preparing files...
/Users/irekrog/Desktop/Projects/react-mail/react-email-starter/out/notion-magic-link.js:3747
return <import_html.Html>
^
SyntaxError: Unexpected token '<'
at Object.compileFunction (node:vm:353:18)
at wrapSafe (node:internal/modules/cjs/loader:1040:15)
at Module._compile (node:internal/modules/cjs/loader:1076:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1166:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:834:12)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at /Users/irekrog/Desktop/Projects/react-mail/react-email-starter/node_modules/react-email/dist/source/commands/export.js:60:75
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
@irekrog What node version are you using?
@bukinoshita I checked it on:
- v16.16.0
- v18.4.0
Hi @bukinoshita any update? because it looks like critical issue
Hey @irekrog, sorry for the delay on responding here. Can you double check with latest version of the package?
Hi @bukinoshita Now another error is displayed:
➜ react-email-starter yarn export
yarn run v1.22.19
$ email export
â ‹ Preparing files...
/Users/irekrog/Desktop/react-email-starter/out/notion-magic-link.js:3904
loginCode = "sparo-ndigo-amurt-secan"
^
TypeError: Cannot read properties of undefined (reading 'loginCode')
at Object.Email (/Users/irekrog/Desktop/react-email-starter/out/notion-magic-link.js:3904:3)
at exportTemplates (/Users/irekrog/Desktop/react-email-starter/node_modules/react-email/dist/source/commands/export.js:61:64)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Experiencing the same issue. Fresh install.
Fixed in https://github.com/resendlabs/react-email/pull/548