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

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
Was this page helpful?