You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cloudflare in their documentation propose to use mimetext for sending emails in their Cloudflare Workers and Cloudflare Email Workers.
The problem
Since updating to version 3.0.21 (although it could be any version after 3.0.16, as it worked previously), the library does not work natively in the Cloudflare Workers environment. By saying natively, I mean without transpiling code or enabling Node.js compatibility modes or flags.
Hotfix solution
Currently, I found two possible solutions:
Use browser version of mimetext: import { createMimeMessage } from 'mimetext/browser';;
Enable node_compat = true in wrangler.toml to turn on Node.js polyfills.
Error details in cloudflare/wrangler-action
Node.js version: 18.19.0
NPM version: 10.2.3
The text was updated successfully, but these errors were encountered:
hey @primeare they look like good solutions, and i think they should be in the readme under use section. create a pr if you wish or i will soon update the readme and include this.
Introduction
Cloudflare in their documentation propose to use
mimetext
for sending emails in their Cloudflare Workers and Cloudflare Email Workers.The problem
Since updating to version
3.0.21
(although it could be any version after3.0.16
, as it worked previously), the library does not work natively in the Cloudflare Workers environment. By saying natively, I mean without transpiling code or enabling Node.js compatibility modes or flags.Hotfix solution
Currently, I found two possible solutions:
mimetext
:import { createMimeMessage } from 'mimetext/browser';
;node_compat = true
inwrangler.toml
to turn on Node.js polyfills.Error details in
cloudflare/wrangler-action
Node.js version: 18.19.0
NPM version: 10.2.3
The text was updated successfully, but these errors were encountered: