nodemailer + convex?
Hi team! sorry it's me again. im running into some bugs when i try to use nodemailer for my app.
in scenario 1, i've been running into
in scenario 2, i've been running into
does anyone know what did i do wrong? i also have
# case 1
.
convex/
email/
├── react-email
│ └── templates
│ └── welcome.tsx
├── send-email.ts
└── transports
└── nodemailerApp.ts
# case 2
.
convex/
├── email
│ ├── react-email
│ │ └── templates
│ │ └── welcome.tsx
│ ├── send-email.ts
│ └── transports
│ └── nodemailerApp.ts# case 1
.
convex/
email/
├── react-email
│ └── templates
│ └── welcome.tsx
├── send-email.ts
└── transports
└── nodemailerApp.ts
# case 2
.
convex/
├── email
│ ├── react-email
│ │ └── templates
│ │ └── welcome.tsx
│ ├── send-email.ts
│ └── transports
│ └── nodemailerApp.tsin scenario 1, i've been running into
⠙ Preparing Convex functions...
✘ [ERROR] Could not resolve "child_process"
node_modules/nodemailer/lib/sendmail-transport/index.js:3:22:
3 │ const spawn = require('child_process').spawn;
╵ ~~~~~~~~~~~~~~~
The package "child_process" wasn't found on the file system but is built into node. Are you trying
to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
...⠙ Preparing Convex functions...
✘ [ERROR] Could not resolve "child_process"
node_modules/nodemailer/lib/sendmail-transport/index.js:3:22:
3 │ const spawn = require('child_process').spawn;
╵ ~~~~~~~~~~~~~~~
The package "child_process" wasn't found on the file system but is built into node. Are you trying
to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
...in scenario 2, i've been running into
⠋ Preparing Convex functions...
Unexpected Error: SyntaxError: 'from' expected. (17:49)
> 17 | import type * as email_react_email_node_modules_@babel_code_frame_LICENSE from "../email/react-email/node_modules/@babel/code-frame/LICENSE";
| ^
18 | import type * as email_react_email_node_modules_@babel_code_frame_lib_index from "../email/react-email/node_modules/@babel/code-frame/lib/index";
...⠋ Preparing Convex functions...
Unexpected Error: SyntaxError: 'from' expected. (17:49)
> 17 | import type * as email_react_email_node_modules_@babel_code_frame_LICENSE from "../email/react-email/node_modules/@babel/code-frame/LICENSE";
| ^
18 | import type * as email_react_email_node_modules_@babel_code_frame_lib_index from "../email/react-email/node_modules/@babel/code-frame/lib/index";
...does anyone know what did i do wrong? i also have
"jsx": "react","jsx": "react", set in my convex/tsconfig.ts. thanks! 