#Worker Email Mimetext

2 messages · Page 1 of 1 (latest)

shadow kayak
#

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';
        ╵                     ~~~~

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

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 …

tacit furnace
#

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