Worker Email Mimetext

In this example (see link), mimetext is used to build the email sent by a worker. However, when attempting to run locally I'm getting node compat issues. I'm running in node compat for compatibility, however, its still showing errors:
X [ERROR] Could not resolve "os"

node_modules/mimetext/dist/node.js:3:20:
3 │ import { EOL } from 'os';
╵ ~~~~
X [ERROR] Could not resolve "os"

node_modules/mimetext/dist/node.js:3:20:
3 │ import { EOL } from 'os';
╵ ~~~~
https://developers.cloudflare.com/email-routing/email-workers/send-email-workers/ Has anyone else encountered this issue or know of any good troubleshooting steps? Hit a brick wall on this one. Thanks!
Cloudflare Docs
Send emails from Workers · Cloudflare Email Routing docs
You can send an email about your Worker’s activity from your Worker to an email address verified on Email Routing. This is useful for when you want to …
1 Reply
GuillaumeLakano
GuillaumeLakano10mo ago
My worker was on comptatibily mode 2023-10-30 and I've just updated it to 2024-03-04, and I have this error too. So I suppose something changed between theses versions. May be you can revert back to a old compatibily date, but the ideal would be to find how to fix it with the new versions In my case, I've just noticed my node_modules was empty, weird, double check if your module is correctly installed
Want results from more Discord servers?
Add your server