Error saving encrypted variable for worker

I get the following error in a red bar at the bottom of the screen when trying to save an encrypted variable for a worker. I guess this isn’t something I’ve done?

Uncaught TypeError: Global addEventListener() cannot be used in modules. Instead, event handlers should be declared as exports on the root module. at line 0 (Code: 10021)

Oh, that’s strange. You’re doing it in this section of the dashboard correct?

I was not able to reproduce myself, it seems CF is expecting a module Worker when you have the old non-module code. Not sure what’s going on there.

I just tried again to see if this is an error that they might have fixed in the meantime. Unfortunately it’s still happening. I’m currently on a free plan (expect I will switched to paid at some point). Is there a way to report bugs back to Cloudflare other than posting in this forum without being on a paid plan?


Can you join the Discord so I can get some information and forward this to the team? Invite: Cloudflare Developers

1 Like