hamid1882
hamid18827d ago

Failed to analyze auth.js: Uncaught ReferenceError: MessageChannel is not defined

Error message: Error fetching POST 400 Bad Request: InvalidModules: Hit an error while pushing: Loading the pushed modules encountered the following error: Failed to analyze auth.js: Uncaught ReferenceError: MessageChannel is not defined attached the auth.ts code.
5 Replies
erquhart
erquhart7d ago
That's an issue with Resend, workarounds here until it's fixed upstream: https://discord.com/channels/1019350475847499849/1328374779635302510/1357014788839833753
vishnu_.
vishnu_.7d ago
We’ve already tried that workaround, but we're still encountering the same error. We also added the following to our convex.json, but it didn’t resolve the issue: { "node": { "externalPackages": ["ai", "react-dom", "resend", "*"] } }
erquhart
erquhart7d ago
You have to import the polyfill, pasting it at the top won't work. The imports will still run before that code executes. Put it in a polyfills.ts file or something and import that file before all the others.
vishnu_.
vishnu_.6d ago
I’ve created a separate polyfills.ts file and imported it at the top level of auth.ts, but we’re still encountering the same error.
erquhart
erquhart6d ago
That’s pretty odd, MessageChannel is defined in the polyfill. If you can share a repro case as a repo I can take a look.

Did you find this page helpful?